1 #ifndef MATEMATICAVECT_H 2 #define MATEMATICAVECT_H 42 void Mult(
double Fact);
135 return (
const double *)&
x;
150 #endif //MATEMATICA_H void Export(double *x)
Export.
void Subs(const Vettore *u, const Vettore *v)
substruct two Vettore
void Copy(Vettore *o)
Copy the vector.
double operator[](int col) const
Returns a entry.
double operator%(const Vettore &Vet)
Scalar product.
double Norm()
Return the norm of a Vettore.
void ApplyOn(Vettore *o)
Apply on a origin.
double Normalize()
Normlizes a Vettore.
Geometrical operations on vectors.
double & operator%=(const Vettore &Vet)
Scalar product.
Vettore operator^(const Vettore &vec)
Vectorial product.
Vettore operator=(const Vettore &Vet)
Assigns the entries of the rhs Vettore to the lhs.
void Print()
Prints the components.
double PerpTo3(Vettore *Pos, Vettore *Axis)
The vector perpendicolar in three dimension (faster)
void ScalV(const Vettore *u, const Vettore *v)
Scalar product between two Vettore.
Vettore operator*(const Vettore &Vet)
Moltiplication component by component.
double Val(int N)
Value of the N column.
double * x
Where the data are stored.
void Axis(Vettore *u, Vettore *v)
Calculates the axis formed by two Vettore.
double CosAngle(Vettore *u)
Computes the cosine with respect to.
double ScalS(const Vettore *u, const Vettore *v)
Multiplies the components of a Vettore for a scalar.
void Rescale(double NewLength)
Rescale the total length of the vector.
Vettore & operator-=(const Vettore &Vet)
Difference component by component.
double Col(int N)
Value of the N column.
const double * getPtr() const
Returns a entry.
Vettore operator-(const Vettore &Vet)
Difference component by component.
Vettore & operator+=(const Vettore &Vet)
Sum component by component.
double ProjOnAxis(Vettore *a)
Projects along the axis.
Vettore operator/(const Vettore &vec)
Division component by component.
double VetV(const Vettore *u, const Vettore *v)
Vectorial product between two Vettore returns the area.
double * getPtr()
Returns a entry.
Vettore & operator*=(const Vettore &vec)
Scalar product.
int NDim
Dimension allocated.
double & operator[](int col)
Returns a entry.
double Abs()
Return the absolute value.
double Angle(Vettore *u, Vettore *v)
Computes the angle between two Vetttore.
Vettore & operator/=(const Vettore &vec)
Division component by component.
double ProjOnSurf(Vettore *S1, Vettore *S2, Vettore *S3, Vettore *P)
Project a point P on the point PS perpendicular to the surface described by the points S1...
void Mult(double Fact)
multiply by a scalar
double VetV3(const Vettore *u, const Vettore *v)
Vectorial product between two Vettore in three dimension (faster) returns the area.
void Normal(const Vettore *u, const Vettore *v)
Computes the normal with respect to the Vettore u and v.
Vettore operator+(const Vettore &Vet)
Sum component by component.
double SinAngle(Vettore *u, Vettore *v)
Computes the sine between two Vettore.
void Set(double Val, int Col)
Set the N column.
Vettore & operator^=(const Vettore &vec)
Vectorial product.
void NormalSurf(const Vettore *u, const Vettore *v, const Vettore *w)
Computes the normal to the plane described by u,v,w.
void PerpTo(Vettore *o)
The vector perpendicolar.