Inheritance diagram for FixedNdVector:
All storage is local to the class.
Definition at line 405 of file Geometry.H.
Public Member Functions | |
FixedNdVector () | |
FixedNdVector (const T &value) | |
Allocate a vector and set all of its elements to the given value. | |
FixedNdVector (const FixedNdPoint< T, Size > &p1, const FixedNdPoint< T, Size > &p2) | |
Allocate a vector from point p1 to point p2 . | |
FixedNdVector (const FixedNdVector< T, Size > &vector) | |
~FixedNdVector () | |
Dimension | |
int | n () const |
| |
Operators | |
FixedNdVector< T, Size > | operator * (const double scalar) const |
Multiply the length of the vector by a scalar. | |
FixedNdVector< T, Size > | operator/ (const double scalar) const |
Divide the length of the vector by a scalar. | |
FixedNdVector< T, Size > & | operator *= (const double scalar) |
Multiply the length of the vector by a scalar. | |
FixedNdVector< T, Size > & | operator/= (const double scalar) |
Divide the length of the vector by a scalar. | |
FixedNdVector< T, Size > | operator+ (const FixedNdVector< T, Size > &vector) const |
Add a vector to the current instance. | |
FixedNdVector< T, Size > | operator- (const FixedNdVector< T, Size > &vector) const |
Subtract one vector from another. | |
FixedNdVector< T, Size > & | operator+= (const FixedNdVector< T, Size > &vector) |
Add a vector to the current instance. | |
FixedNdVector< T, Size > & | operator-= (const FixedNdVector< T, Size > &vector) |
Subtract a vector from the current instance. | |
FixedNdVector< T, Size > | operator- () const |
Reverse the direction of a vector. | |
double | operator * (const FixedNdVector< T, Size > &vector) |
Calculate the inner (dot) product of two vectors. | |
double | length () const |
| |
void | normalize (const double new_length=1.0) |
Set the length of the vector to the specified value. |
FixedNdVector | ( | ) | [inline] |
Definition at line 407 of file Geometry.H.
FixedNdVector | ( | const T & | value | ) | [inline] |
Allocate a vector and set all of its elements to the given value.
[in] | value | The value to set the elements to. |
Definition at line 410 of file Geometry.H.
FixedNdVector | ( | const FixedNdPoint< T, Size > & | p1, | |
const FixedNdPoint< T, Size > & | p2 | |||
) | [inline] |
Allocate a vector from point p1
to point p2
.
[in] | p1 | The starting point. |
[in] | p2 | The ending point. |
Definition at line 414 of file Geometry.H.
FixedNdVector | ( | const FixedNdVector< T, Size > & | vector | ) | [inline] |
Definition at line 416 of file Geometry.H.
~FixedNdVector | ( | ) | [inline] |
Definition at line 417 of file Geometry.H.
int n | ( | ) | const [inline] |
FixedNdVector<T, Size> operator * | ( | const double | scalar | ) | const [inline] |
Multiply the length of the vector by a scalar.
[in] | scalar | The number to multiply the vector by. |
Definition at line 433 of file Geometry.H.
FixedNdVector<T, Size> operator/ | ( | const double | scalar | ) | const [inline] |
Divide the length of the vector by a scalar.
[in] | scalar | The number to divide the vector by. |
Definition at line 439 of file Geometry.H.
FixedNdVector<T, Size>& operator *= | ( | const double | scalar | ) | [inline] |
Multiply the length of the vector by a scalar.
[in] | scalar | The number to multiply the vector by. |
Definition at line 446 of file Geometry.H.
FixedNdVector<T, Size>& operator/= | ( | const double | scalar | ) | [inline] |
Divide the length of the vector by a scalar.
[in] | scalar | The number to divide the vector by. |
Definition at line 452 of file Geometry.H.
Referenced by FixedNdVector< T, 4 >::normalize().
FixedNdVector<T, Size> operator+ | ( | const FixedNdVector< T, Size > & | vector | ) | const [inline] |
Add a vector to the current instance.
[in] | vector | The vector to add. |
Definition at line 459 of file Geometry.H.
FixedNdVector<T, Size> operator- | ( | const FixedNdVector< T, Size > & | vector | ) | const [inline] |
Subtract one vector from another.
[in] | vector | The vector to subtract. |
Definition at line 465 of file Geometry.H.
FixedNdVector<T, Size>& operator+= | ( | const FixedNdVector< T, Size > & | vector | ) | [inline] |
Add a vector to the current instance.
[in] | vector | The vector to add. |
Definition at line 472 of file Geometry.H.
FixedNdVector<T, Size>& operator-= | ( | const FixedNdVector< T, Size > & | vector | ) | [inline] |
Subtract a vector from the current instance.
[in] | vector | The vector to subtract. |
Definition at line 479 of file Geometry.H.
FixedNdVector<T, Size> operator- | ( | ) | const [inline] |
Reverse the direction of a vector.
Definition at line 486 of file Geometry.H.
double operator * | ( | const FixedNdVector< T, Size > & | vector | ) | [inline] |
Calculate the inner (dot) product of two vectors.
[in] | vector | The second vector. |
Definition at line 494 of file Geometry.H.
double length | ( | ) | const [inline] |
Definition at line 500 of file Geometry.H.
Referenced by FixedNdVector< T, 4 >::normalize().
void normalize | ( | const double | new_length = 1.0 |
) | [inline] |
Set the length of the vector to the specified value.
[in] | new_length | The new length of the vector. |
Definition at line 510 of file Geometry.H.