Go to the source code of this file.
Returns the absolute value term by term of the vector.
- Parameters
-
- Returns
- Vector
1490 for (n = 1; n <=
dim(V); n++)
1494 result.setValue(n, -a);
1496 result.setValue(n, a);
Standard class for every vector in Carmen.
Definition: Vector.h:29
int dim(const Vector &V)
Returns the dimension of the vector. Similar to int Vector::dimension().
Definition: Vector.cpp:1473
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565
#define real
Definition: PreProcessor.h:31
Returns the dimension of the vector. Similar to int Vector::dimension().
- Parameters
-
- Returns
- int
int dimension() const
Returns the dimension of the vector.
Definition: Vector.h:535
Returns the L1-norm of the vector.
- Parameters
-
- Returns
- real
1513 for (n = 1; n <=
dim(V); n++)
1514 result += fabs(V.
value(n));
int dim(const Vector &V)
Returns the dimension of the vector. Similar to int Vector::dimension().
Definition: Vector.cpp:1473
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565
#define real
Definition: PreProcessor.h:31
Returns the L2-norm of the vector.
- Parameters
-
- Returns
- real
1531 for (n = 1; n <=
dim(V); n++)
1534 return sqrt(result);
int dim(const Vector &V)
Returns the dimension of the vector. Similar to int Vector::dimension().
Definition: Vector.cpp:1473
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565
#define real
Definition: PreProcessor.h:31
Returns the Max-norm of the vector.
- Parameters
-
- Returns
- real
1549 for (n = 1; n <=
dim(V); n++)
1550 if (result < fabs(V.
value(n))) result = fabs(V.
value(n));
int dim(const Vector &V)
Returns the dimension of the vector. Similar to int Vector::dimension().
Definition: Vector.cpp:1473
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565
#define real
Definition: PreProcessor.h:31
ostream& operator<< |
( |
ostream & |
out, |
|
|
const Vector & |
V |
|
) |
| |
Writes the components of the vector V on screen.
- Parameters
-
- Returns
- ostream&
1566 for (n = 1; n <=
dim(V); n++)
1568 out<<n<<
": "<<V.
value(n)<<endl;
int dim(const Vector &V)
Returns the dimension of the vector. Similar to int Vector::dimension().
Definition: Vector.cpp:1473
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565