10 #ifndef ROOT_Minuit2_LAVector 11 #define ROOT_Minuit2_LAVector 29 int Mndaxpy(
unsigned int,
double,
const double*,
int,
double*,
int);
30 int Mndscal(
unsigned int,
double,
double*,
int);
31 int Mndspmv(
const char*,
unsigned int,
double,
const double*,
const double*,
int,
double,
double*,
int);
84 template<
class A,
class B,
class T>
87 (*this) =
sum.Obj().A();
88 (*this) +=
sum.Obj().B();
89 (*this) *= double(
sum.f());
92 template<
class A,
class T>
98 (*this) =
sum.Obj().B();
100 (*this) +=
sum.Obj().A();
101 (*this) *= double(
sum.f());
105 template<
class A,
class T>
108 (*this) = something.Obj();
109 (*this) *= something.f();
117 Mndspmv(
"U",
fSize, prod.f()*prod.Obj().A().f()*prod.Obj().B().f(), prod.Obj().A().Obj().Data(), prod.Obj().B().Obj().Data(), 1, 0.,
fData, 1);
122 LAVector(
const ABObj<
vec,
ABSum<
ABObj<
vec,
ABProd<
ABObj<sym, LASymMatrix, T>,
ABObj<vec, LAVector, T> >,
T>,
ABObj<vec, LAVector, T> >,
T>& prod) :
fSize(0),
fData(0) {
123 (*this) = prod.Obj().B();
124 (*this) += prod.Obj().A();
125 (*this) *= double(prod.f());
156 template<
class A,
class T>
165 Mndspmv(
"U",
fSize, prod.f()*prod.Obj().A().f()*prod.Obj().B().f(), prod.Obj().A().Obj().Data(), prod.Obj().B().Data(), 1, 1.,
fData, 1);
210 if(fSize == 0 && fData == 0) {
211 fSize = v.
Obj().size();
214 assert(fSize == v.
Obj().size());
216 memcpy(fData, v.
Obj().Data(), fSize*
sizeof(double));
221 template<
class A,
class T>
224 if(fSize == 0 && fData == 0) {
225 (*this) = something.Obj();
228 assert(fSize == tmp.size());
229 memcpy(fData, tmp.Data(), fSize*
sizeof(double));
231 (*this) *= something.f();
235 template<
class A,
class B,
class T>
237 if(fSize == 0 && fData == 0) {
238 (*this) =
sum.Obj().A();
239 (*this) +=
sum.Obj().B();
242 tmp +=
sum.Obj().B();
243 assert(fSize == tmp.size());
244 memcpy(fData, tmp.Data(), fSize*
sizeof(double));
250 template<
class A,
class T>
252 if(fSize == 0 && fData == 0) {
253 (*this) =
sum.Obj().B();
254 (*this) +=
sum.Obj().A();
257 tmp +=
sum.Obj().B();
258 assert(fSize == tmp.size());
259 memcpy(fData, tmp.Data(), fSize*
sizeof(double));
268 if(fSize == 0 && fData == 0) {
269 fSize = prod.Obj().B().Obj().
size();
271 Mndspmv(
"U", fSize,
double(prod.f()*prod.Obj().A().f()*prod.Obj().B().f()), prod.Obj().A().Obj().Data(), prod.Obj().B().Obj().Data(), 1, 0.,
fData, 1);
274 assert(fSize == tmp.size());
275 Mndspmv(
"U", fSize,
double(prod.f()*prod.Obj().A().f()), prod.Obj().A().Obj().Data(), tmp.Data(), 1, 0.,
fData, 1);
282 LAVector&
operator=(
const ABObj<
vec,
ABSum<
ABObj<
vec,
ABProd<
ABObj<sym, LASymMatrix, T>,
ABObj<vec, LAVector, T> >,
T>,
ABObj<vec, LAVector, T> >,
T>& prod) {
283 if(fSize == 0 && fData == 0) {
284 (*this) = prod.Obj().B();
285 (*this) += prod.Obj().A();
289 tmp += prod.Obj().A();
290 assert(fSize == tmp.size());
291 memcpy(fData, tmp.Data(), fSize*
sizeof(double));
303 #endif // ROOT_Minuit2_LAVector
static long int sum(long int i)
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, LAVector, T >, ABObj< vec, A, T > >, T > &sum)
LAVector(const ABObj< vec, ABSum< ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector & operator+=(const ABObj< vec, LAVector, T > &m)
double operator[](unsigned int i) const
Namespace for new ROOT classes and functions.
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T >, ABObj< vec, LAVector, T > >, T > &prod)
int Mndaxpy(unsigned int, double, const double *, int, double *, int)
LAVector(const ABObj< vec, ABSum< ABObj< vec, LAVector, T >, ABObj< vec, A, T > >, T > &sum)
LAVector(const ABObj< vec, ABSum< ABObj< vec, A, T >, ABObj< vec, B, T > >, T > &sum)
LAVector & operator-=(const LAVector &m)
void * Allocate(size_t nBytes)
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, A, T >, ABObj< vec, B, T > >, T > &sum)
double & operator()(unsigned int i)
LAVector(const ABObj< vec, LAVector, T > &v)
LAVector & operator=(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector & operator*=(double scal)
LAVector & operator+=(const ABObj< vec, A, T > &m)
unsigned int size() const
LAVector & operator+=(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
int Mndscal(unsigned int, double, double *, int)
LAVector & operator=(const LAVector &v)
LAVector(const ABObj< vec, ABObj< vec, A, T >, T > &something)
LAVector & operator=(const ABObj< vec, ABObj< vec, A, T >, T > &something)
LAVector(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector & operator+=(const LAVector &m)
LAVector & operator=(const ABObj< vec, LAVector, T > &v)
TCppObject_t Allocate(TCppType_t type)
const double * Data() const
double & operator[](unsigned int i)
static StackAllocator & Get()
double operator()(unsigned int i) const
int Mndspmv(const char *, unsigned int, double, const double *, const double *, int, double, double *, int)
LAVector(const LAVector &v)