|
CGAL 5.1 - dD Geometry Kernel
|
#include <Concepts/Vector.h>
An instance of data type Vector is a vector of variables of number type NT. Together with the type Matrix it realizes the basic operations of linear algebra.
Types | |
| typedef unspecified_type | NT |
| the ring type of the components. More... | |
| typedef unspecified_type | iterator |
| the iterator type for accessing components. More... | |
| typedef unspecified_type | const_iterator |
| the const iterator type for accessing components. More... | |
Creation | |
| Vector () | |
creates an instance v of type Vector. More... | |
| Vector (int d) | |
creates an instance v of type Vector. More... | |
| Vector (int d, NT x) | |
creates an instance v of type Vector. More... | |
| template<class Forward_iterator > | |
| Vector (Forward_iterator first, Forward_iterator last) | |
creates an instance v of type Vector; v is initialized to the vector with entries set [first,last). More... | |
Operations | |
| int | dimension () |
returns the dimension of v. More... | |
| bool | is_zero () |
returns true iff v is the zero vector. More... | |
| NT & | operator[] (int i) |
returns the \( i\)-th component of v. More... | |
| iterator | begin () |
| iterator to the first component. More... | |
| iterator | end () |
| iterator beyond the last component. More... | |
| const_iterator | begin () const |
| iterator to the first component. More... | |
| const_iterator | end () const |
| iterator beyond the last component. More... | |
| Vector | operator+ (const Vector &v1) |
| Addition. More... | |
| Vector | operator- (const Vector &v1) |
| Subtraction. More... | |
| NT | operator* (const Vector &v1) |
| Inner Product. More... | |
| Vector | operator- () |
| Negation. More... | |
| Vector & | operator+= (const Vector &v1) |
| Addition plus assignment. More... | |
| Vector & | operator-= (const Vector &v1) |
| Subtraction plus assignment. More... | |
| Vector & | operator*= (const NT &s) |
| Scalar multiplication plus assignment. More... | |
| Vector & | operator/= (const NT &s) |
| Scalar division plus assignment. More... | |
| Vector | operator* (const NT &r, const Vector &v) |
| Component-wise multiplication with number \( r\). More... | |
| Vector | operator* (const Vector &v, const NT &r) |
| Component-wise multiplication with number \( r\). More... | |
| typedef unspecified_type Vector::const_iterator |
the const iterator type for accessing components.
| typedef unspecified_type Vector::iterator |
the iterator type for accessing components.
| typedef unspecified_type Vector::NT |
the ring type of the components.
| Vector::Vector | ( | ) |
creates an instance v of type Vector.
| Vector::Vector | ( | int | d | ) |
creates an instance v of type Vector.
v is initialized to a vector of dimension \( d\).
| Vector::Vector | ( | int | d, |
| NT | x | ||
| ) |
creates an instance v of type Vector.
v is initialized to a vector of dimension \( d\) with entries x.
| Vector::Vector | ( | Forward_iterator | first, |
| Forward_iterator | last | ||
| ) |
creates an instance v of type Vector; v is initialized to the vector with entries set [first,last).
| ForwardIterator | has NT as value type. |
| iterator Vector::begin | ( | ) |
iterator to the first component.
| const_iterator Vector::begin | ( | ) | const |
iterator to the first component.
| int Vector::dimension | ( | ) |
returns the dimension of v.
| iterator Vector::end | ( | ) |
iterator beyond the last component.
| const_iterator Vector::end | ( | ) | const |
iterator beyond the last component.
| bool Vector::is_zero | ( | ) |
returns true iff v is the zero vector.
Component-wise multiplication with number \( r\).
Component-wise multiplication with number \( r\).
Inner Product.
v.dimension() = v1.dimension(). Addition.
v.dimension() == v1.dimension(). Addition plus assignment.
v.dimension() == v1.dimension(). | Vector Vector::operator- | ( | ) |
Negation.
Subtraction.
v.dimension() = v1.dimension(). Subtraction plus assignment.
v.dimension() == v1.dimension(). | NT& Vector::operator[] | ( | int | i | ) |
returns the \( i\)-th component of v.