SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
slip::Vector3d< T > Class Template Reference

This is a Vector3d struct. It is a specialization of kvector. It implements some specific 3d operations. More...

#include <Vector3d.hpp>

Inheritance diagram for slip::Vector3d< T >:
Inheritance graph

Public Types

typedef Vector3d< T > self
 
typedef T value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef ptrdiff_t difference_type
 
typedef std::size_t size_type
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 
typedef const kvector< T, N > const_self
 
typedef slip::stride_iterator
< pointer
iterator_range
 
typedef slip::stride_iterator
< const_pointer
const_iterator_range
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
typedef std::reverse_iterator
< iterator_range
reverse_iterator_range
 
typedef std::reverse_iterator
< const_iterator_range
const_reverse_iterator_range
 
typedef slip::lin_alg_traits
< value_type >::value_type 
norm_type
 
typedef iterator default_iterator
 
typedef const_iterator const_default_iterator
 

Public Member Functions

self operator- () const
 
std::string name () const
 Returns the name of the class. More...
 
size_type size () const
 Returns the number of elements in the kvector. More...
 
size_type max_size () const
 Returns the maximal size (number of elements) in the kvector. More...
 
bool empty () const
 Returns true if the kvector is empty. (Thus size == 0) More...
 
void swap (kvector &x)
 Swaps data with another kvector. More...
 
Constructors
 Vector3d ()
 Default constructor init all the components to 0. More...
 
 Vector3d (const T &val)
 Constructor init all the components to val. More...
 
 Vector3d (const T &x1, const T &x2, const T &x3)
 Constructor init all the components to val. More...
 
 Vector3d (const T *val)
 Constructor init the Vector3d with the val array. More...
 
 Vector3d (const Vector3d< T > &rhs)
 Copy constructor init the Vector3d with another Vector3d. More...
 
Accesors
const T & get_x1 () const
 Accessor to the first dimension value of the Vector3d. More...
 
const T & get_x () const
 Accessor to the first dimension value of the Vector3d. More...
 
const T & u () const
 Accessor to the first dimension value of the Vector3d. More...
 
const T & get_x2 () const
 Accessor to the second dimension value of the Vector3d. More...
 
const T & get_y () const
 Accessor to the second dimension value of the Vector3d. More...
 
const T & v () const
 Accessor to the second dimension value of the Vector3d. More...
 
const T & get_x3 () const
 Accessor to the third dimension value of the Vector3d. More...
 
const T & get_z () const
 Accessor to the third dimension value of the Vector3d. More...
 
const T & w () const
 Accessor to the third dimension value of the Vector3d. More...
 
void set_x1 (const T &x1)
 Mutator of the first dimension value of the Vector3d. More...
 
void set_x (const T &r)
 Mutator of the first dimension value of the Vector3d. More...
 
void u (const T &u_)
 Mutator of the first dimension value of the Vector3d. More...
 
void set_x2 (const T &x2)
 Mutator of the second dimension value of the Vector3d. More...
 
void set_y (const T &g)
 Mutator of the second dimension value of the Vector3d. More...
 
void v (const T &v_)
 Mutator of the second dimension value of the Vector3d. More...
 
void set_x3 (const T &x3)
 Mutator of the third dimension value of the Vector3d. More...
 
void set_z (const T &r)
 Mutator of the third dimension value of the Vector3d. More...
 
void w (const T &w_)
 Mutator of the third dimension value of the Vector3d. More...
 
void set (const T &x1, const T &x2, const T &x3)
 Mutator of the three dimension values of the Vector3d. More...
 
Mathematical operators
self product (const self &other) const
 Computes the vector cross product betwin the current Vector3d and the Vector3d other. More...
 
iterators
iterator begin ()
 Returns a read/write iterator that points to the first element in the kvector. Iteration is done in ordinary element order. More...
 
const_iterator begin () const
 Returns a read-only (constant) iterator that points to the first element in the kvector. Iteration is done in ordinary element order. More...
 
iterator_range begin (const slip::Range< int > &range)
 Returns a read/write iterator_range that points the first element within the Range. Iteration is done in ordinary element order according to the Range. More...
 
const_iterator_range begin (const slip::Range< int > &range) const
 Returns a read-only (constant) iterator_range that points the first element within the Range. Iteration is done in ordinary element order according to the Range. More...
 
iterator end ()
 Returns a read/write iterator that points one past the last element in the kvector. Iteration is done in ordinary element order. More...
 
const_iterator end () const
 Returns a read-only (constant) iterator that points one past the last element in the kvector. Iteration is done in ordinary element order. More...
 
iterator_range end (const slip::Range< int > &range)
 Returns a read/write iterator_range that points one past the last element in the kvector. Iteration is done in ordinary element order according to the Range. More...
 
const_iterator_range end (const slip::Range< int > &range) const
 Returns a read-only (constant) iterator_range that points one past the last element in the kvector. Iteration is done in ordinary element order according to the Range. More...
 
reverse_iterator rbegin ()
 Returns a read/write reverse iterator that points to the last element in the kvector. Iteration is done in reverse element order. More...
 
const_reverse_iterator rbegin () const
 Returns a read-only (constant) reverse iterator that points to the last element in the kvector. Iteration is done in reverse element order. More...
 
reverse_iterator_range rbegin (const slip::Range< int > &range)
 Returns a read/write reverse_iterator_range that points the end element within the Range. Iteration is done in reverse element order according to the Range. More...
 
const_reverse_iterator_range rbegin (const slip::Range< int > &range) const
 Returns a read-only (constant) reverse_iterator_range that points the end element within the Range. Iteration is done in reverse element order according to the Range. More...
 
reverse_iterator rend ()
 Returns a read/write reverse iterator that points to one before the first element in the kvector. Iteration is done in reverse element order. More...
 
const_reverse_iterator rend () const
 Returns a read-only (constant) reverse iterator that points to one before the first element in the kvector. Iteration is done in reverse element order. More...
 
reverse_iterator_range rend (const slip::Range< int > &range)
 Returns a read/write reverse_iterator_range that points one previous the first element in the Range. Iteration is done in reverse element order according to the Range. More...
 
const_reverse_iterator_range rend (const slip::Range< int > &range) const
 Returns a read-only (constant) reverse_iterator_range that points one previous the first element in the Range. Iteration is done in reverse element order according to the Range. More...
 
Assignment methods
void fill (const T &value)
 Fills the container range [begin(),begin()+N) with copies of value. More...
 
void fill (const T *value)
 Fills the container range [begin(),begin()+N) with a copy of the value array. More...
 
void fill (InputIterator first, InputIterator last)
 Fills the container range [begin(),begin()+N) with a copy of the range [first,last) More...
 
Element access operators
reference operator[] (const size_type n)
 Subscript access to the data contained in the kvector. More...
 
const_reference operator[] (const size_type n) const
 Subscript access to the data contained in the kvector. More...
 
reference operator() (const size_type n)
 Subscript access to the data contained in the kvector. More...
 
const_reference operator() (const size_type n) const
 Subscript access to the data contained in the kvector. More...
 
Arithmetic operators
selfoperator+= (const T &val)
 Add val to each element of the kvector. More...
 
selfoperator+= (const self &rhs)
 
selfoperator-= (const T &val)
 
selfoperator-= (const self &rhs)
 
selfoperator*= (const T &val)
 
selfoperator*= (const self &rhs)
 
selfoperator/= (const T &val)
 
selfoperator/= (const self &rhs)
 
Mathematical operators
T & min ()
 Returns the min element of the kvector according to the operator <, if T is std::complex, it returns the element of minimum magnitude. More...
 
T & max ()
 Returns the max element of the kvector according to the operator >, if T is std::complex, it returns the element of maximum magnitude. More...
 
sum () const
 Returns the sum of the elements of the kvector. More...
 
norm_type Euclidean_norm () const
 Returns the Euclidean norm $\left(\sum_i x_i\bar{x_i} \right)^{\frac{1}{2}}$ of the elements of the kvector. More...
 
norm_type L2_norm () const
 Returns the Euclidean norm $\left(\sum_i x_i\bar{x_i} \right)^{\frac{1}{2}}$ of the elements of the kvector. More...
 
norm_type L1_norm () const
 Returns the L1 norm ( $\sum_i |xi|$) of the elements of the kvector. More...
 
norm_type L22_norm () const
 Returns the L22 norm ( $\sum_i xi^2$) of the elements of the kvector. More...
 
norm_type infinite_norm () const
 Returns the infinite norm ( $\max_i\{|xi|\}$) of the elements of the kvector. More...
 
Real dot (const self &other)
 Computes the dot product with another kvector other. More...
 
kvector< T, N > & apply (T(*fun)(T))
 Applys the one-parameter C-function fun to each element of the kvector. More...
 
kvector< T, N > & apply (T(*fun)(const T &))
 Applys the one-parameter C-function fun to each element of the kvector. More...
 

Public Attributes

data [N]
 Data array storage of the kvector. More...
 

Static Public Attributes

static const std::size_t SIZE
 
static const std::size_t DIM
 

Friends

class boost::serialization::access
 
Comparison operators
bool operator< (const Vector3d< T > &x, const Vector3d< T > &y)
 Less Compare operator. More...
 
bool operator> (const Vector3d< T > &x, const Vector3d< T > &y)
 Greater Compare operator. More...
 
bool operator<= (const Vector3d< T > &x, const Vector3d< T > &y)
 Less equal Compare operator. More...
 
bool operator> (const Vector3d< T > &x, const Vector3d< T > &y)
 Greater equal Compare operator. More...
 

Detailed Description

template<typename T>
class slip::Vector3d< T >

This is a Vector3d struct. It is a specialization of kvector. It implements some specific 3d operations.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2014/03/25
Since
1.0.0
Parameters
TType of the Vector3d

Definition at line 96 of file Vector3d.hpp.

Member Typedef Documentation

Definition at line 178 of file KVector.hpp.

template<typename T>
typedef const_pointer slip::Vector3d< T >::const_iterator

Definition at line 136 of file Vector3d.hpp.

Definition at line 165 of file KVector.hpp.

template<typename T>
typedef const value_type* slip::Vector3d< T >::const_pointer

Definition at line 128 of file Vector3d.hpp.

template<typename T>
typedef const value_type& slip::Vector3d< T >::const_reference

Definition at line 130 of file Vector3d.hpp.

typedef std::reverse_iterator<const_iterator> slip::kvector< T, N >::const_reverse_iterator
inherited

Definition at line 168 of file KVector.hpp.

typedef std::reverse_iterator<const_iterator_range> slip::kvector< T, N >::const_reverse_iterator_range
inherited

Definition at line 171 of file KVector.hpp.

typedef const kvector<T,N> slip::kvector< T, N >::const_self
inherited

Definition at line 152 of file KVector.hpp.

typedef iterator slip::kvector< T, N >::default_iterator
inherited

Definition at line 177 of file KVector.hpp.

template<typename T>
typedef ptrdiff_t slip::Vector3d< T >::difference_type

Definition at line 132 of file Vector3d.hpp.

template<typename T>
typedef pointer slip::Vector3d< T >::iterator

Definition at line 135 of file Vector3d.hpp.

Definition at line 164 of file KVector.hpp.

Definition at line 173 of file KVector.hpp.

template<typename T>
typedef value_type* slip::Vector3d< T >::pointer

Definition at line 127 of file Vector3d.hpp.

template<typename T>
typedef value_type& slip::Vector3d< T >::reference

Definition at line 129 of file Vector3d.hpp.

typedef std::reverse_iterator<iterator> slip::kvector< T, N >::reverse_iterator
inherited

Definition at line 167 of file KVector.hpp.

typedef std::reverse_iterator<iterator_range> slip::kvector< T, N >::reverse_iterator_range
inherited

Definition at line 170 of file KVector.hpp.

template<typename T>
typedef Vector3d<T> slip::Vector3d< T >::self

Definition at line 125 of file Vector3d.hpp.

template<typename T>
typedef std::size_t slip::Vector3d< T >::size_type

Definition at line 133 of file Vector3d.hpp.

template<typename T>
typedef T slip::Vector3d< T >::value_type

Definition at line 126 of file Vector3d.hpp.

Constructor & Destructor Documentation

template<typename T >
slip::Vector3d< T >::Vector3d ( )
inline

Default constructor init all the components to 0.

Definition at line 425 of file Vector3d.hpp.

template<typename T >
slip::Vector3d< T >::Vector3d ( const T &  val)
inline

Constructor init all the components to val.

Parameters
valinitial value

Definition at line 432 of file Vector3d.hpp.

template<typename T >
slip::Vector3d< T >::Vector3d ( const T &  x1,
const T &  x2,
const T &  x3 
)
inline

Constructor init all the components to val.

Parameters
x1initial value of the first Vector3d dimension
x2initial value of the second Vector3d dimension
x3initial value of the third Vector3d dimension

Definition at line 439 of file Vector3d.hpp.

template<typename T >
slip::Vector3d< T >::Vector3d ( const T *  val)
inline

Constructor init the Vector3d with the val array.

Parameters
valinitial value

Definition at line 451 of file Vector3d.hpp.

template<typename T >
slip::Vector3d< T >::Vector3d ( const Vector3d< T > &  rhs)
inline

Copy constructor init the Vector3d with another Vector3d.

Parameters
rhsThe other Vector3d

Definition at line 460 of file Vector3d.hpp.

Member Function Documentation

kvector<T,N>& slip::kvector< T, N >::apply ( T(*)(T)  fun)
inlineinherited

Applys the one-parameter C-function fun to each element of the kvector.

Parameters
funThe one-parameter C function
Returns
the resulting kvector
Example:
//fill V with values from 1 to 7 with step 1
slip::iota(V.begin(),V.end(),1.0,1.0);
//apply std::sqrt to each element of V

Definition at line 906 of file KVector.hpp.

kvector<T,N>& slip::kvector< T, N >::apply ( T(*)(const T &)  fun)
inlineinherited

Applys the one-parameter C-function fun to each element of the kvector.

Parameters
funThe one-const-parameter C function
Returns
the resulting kvector
Example:
//fill V with values from 1 to 7 with step 1
slip::iota(V.begin(),V.end(),1.0,1.0);
//apply std::sqrt to each element of V

Definition at line 927 of file KVector.hpp.

iterator slip::kvector< T, N >::begin ( )
inlineinherited

Returns a read/write iterator that points to the first element in the kvector. Iteration is done in ordinary element order.

Returns
begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Examples:
regularvector3dfield3d_op.cpp.

Definition at line 196 of file KVector.hpp.

const_iterator slip::kvector< T, N >::begin ( ) const
inlineinherited

Returns a read-only (constant) iterator that points to the first element in the kvector. Iteration is done in ordinary element order.

Returns
const begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 207 of file KVector.hpp.

iterator_range slip::kvector< T, N >::begin ( const slip::Range< int > &  range)
inlineinherited

Returns a read/write iterator_range that points the first element within the Range. Iteration is done in ordinary element order according to the Range.

Parameters
range.Range to iterate.
Returns
end iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.begin(range),A5.end(range),std::ostream_iterator<double>(std::cout," "));

Definition at line 248 of file KVector.hpp.

const_iterator_range slip::kvector< T, N >::begin ( const slip::Range< int > &  range) const
inlineinherited

Returns a read-only (constant) iterator_range that points the first element within the Range. Iteration is done in ordinary element order according to the Range.

Parameters
range.Range to iterate.
Returns
const_iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.begin(range),A5.end(range),std::ostream_iterator<double>(std::cout,"
"));

Definition at line 276 of file KVector.hpp.

Real slip::kvector< T, N >::dot ( const self other)
inlineinherited

Computes the dot product with another kvector other.

Parameters
other.Other Kvector.
Returns
The Real result of the dot product.

Definition at line 885 of file KVector.hpp.

bool slip::kvector< T, N >::empty ( ) const
inlineinherited

Returns true if the kvector is empty. (Thus size == 0)

Definition at line 779 of file KVector.hpp.

iterator slip::kvector< T, N >::end ( )
inlineinherited

Returns a read/write iterator that points one past the last element in the kvector. Iteration is done in ordinary element order.

Returns
end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 217 of file KVector.hpp.

const_iterator slip::kvector< T, N >::end ( ) const
inlineinherited

Returns a read-only (constant) iterator that points one past the last element in the kvector. Iteration is done in ordinary element order.

Returns
const end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 227 of file KVector.hpp.

iterator_range slip::kvector< T, N >::end ( const slip::Range< int > &  range)
inlineinherited

Returns a read/write iterator_range that points one past the last element in the kvector. Iteration is done in ordinary element order according to the Range.

Parameters
range.Range to iterate.
Returns
end iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.begin(range),A5.end(range),std::ostream_iterator<double>(std::cout," "));

Definition at line 303 of file KVector.hpp.

const_iterator_range slip::kvector< T, N >::end ( const slip::Range< int > &  range) const
inlineinherited

Returns a read-only (constant) iterator_range that points one past the last element in the kvector. Iteration is done in ordinary element order according to the Range.

Parameters
range.Range to iterate.
Returns
const_iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.begin(range),A5.end(range),std::ostream_iterator<double>(std::cout,"
"));

Definition at line 326 of file KVector.hpp.

norm_type slip::kvector< T, N >::Euclidean_norm ( ) const
inlineinherited

Returns the Euclidean norm $\left(\sum_i x_i\bar{x_i} \right)^{\frac{1}{2}}$ of the elements of the kvector.

Precondition
size() != 0

Definition at line 832 of file KVector.hpp.

void slip::kvector< T, N >::fill ( const T &  value)
inlineinherited

Fills the container range [begin(),begin()+N) with copies of value.

Parameters
valueA reference-to-const of arbitrary type.

Definition at line 521 of file KVector.hpp.

void slip::kvector< T, N >::fill ( const T *  value)
inlineinherited

Fills the container range [begin(),begin()+N) with a copy of the value array.

Parameters
valueA pointer of arbitrary type.

Definition at line 531 of file KVector.hpp.

void slip::kvector< T, N >::fill ( InputIterator  first,
InputIterator  last 
)
inlineinherited

Fills the container range [begin(),begin()+N) with a copy of the range [first,last)

Parameters
firstAn input iterator.
lastAn input iterator.

Definition at line 545 of file KVector.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_x ( ) const
inline

Accessor to the first dimension value of the Vector3d.

Returns
Returns the first dimension value of the Vector3d

Definition at line 522 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_x1 ( ) const
inline

Accessor to the first dimension value of the Vector3d.

Returns
Returns the first dimension value of the Vector3d

Definition at line 518 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_x2 ( ) const
inline

Accessor to the second dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 531 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_x3 ( ) const
inline

Accessor to the third dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 544 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_y ( ) const
inline

Accessor to the second dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 535 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::get_z ( ) const
inline

Accessor to the third dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 548 of file Vector3d.hpp.

norm_type slip::kvector< T, N >::infinite_norm ( ) const
inlineinherited

Returns the infinite norm ( $\max_i\{|xi|\}$) of the elements of the kvector.

Precondition
size() != 0

Definition at line 873 of file KVector.hpp.

norm_type slip::kvector< T, N >::L1_norm ( ) const
inlineinherited

Returns the L1 norm ( $\sum_i |xi|$) of the elements of the kvector.

Precondition
size() != 0

Definition at line 853 of file KVector.hpp.

norm_type slip::kvector< T, N >::L22_norm ( ) const
inlineinherited

Returns the L22 norm ( $\sum_i xi^2$) of the elements of the kvector.

Precondition
size() != 0

Definition at line 863 of file KVector.hpp.

norm_type slip::kvector< T, N >::L2_norm ( ) const
inlineinherited

Returns the Euclidean norm $\left(\sum_i x_i\bar{x_i} \right)^{\frac{1}{2}}$ of the elements of the kvector.

Precondition
size() != 0

Definition at line 842 of file KVector.hpp.

T& slip::kvector< T, N >::max ( )
inlineinherited

Returns the max element of the kvector according to the operator >, if T is std::complex, it returns the element of maximum magnitude.

Precondition
size() != 0

Definition at line 812 of file KVector.hpp.

size_type slip::kvector< T, N >::max_size ( ) const
inlineinherited

Returns the maximal size (number of elements) in the kvector.

Definition at line 771 of file KVector.hpp.

T& slip::kvector< T, N >::min ( )
inlineinherited

Returns the min element of the kvector according to the operator <, if T is std::complex, it returns the element of minimum magnitude.

Precondition
size() != 0

Definition at line 800 of file KVector.hpp.

template<typename T >
std::string slip::Vector3d< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 744 of file Vector3d.hpp.

reference slip::kvector< T, N >::operator() ( const size_type  n)
inlineinherited

Subscript access to the data contained in the kvector.

Parameters
nThe index of the element for which data should be accessed.
Returns
Read/write reference to data.
Precondition
n < N

This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 659 of file KVector.hpp.

const_reference slip::kvector< T, N >::operator() ( const size_type  n) const
inlineinherited

Subscript access to the data contained in the kvector.

Parameters
nThe index of the element for which data should be accessed.
Returns
Read-only (constant) reference to data.
Precondition
n < N

This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 673 of file KVector.hpp.

self& slip::kvector< T, N >::operator*= ( const T &  val)
inlineinherited

Definition at line 699 of file KVector.hpp.

self& slip::kvector< T, N >::operator*= ( const self rhs)
inlineinherited

Definition at line 739 of file KVector.hpp.

self& slip::kvector< T, N >::operator+= ( const T &  val)
inlineinherited

Add val to each element of the kvector.

Parameters
valvalue
Returns
reference to the resulting kvector

Definition at line 687 of file KVector.hpp.

self& slip::kvector< T, N >::operator+= ( const self rhs)
inlineinherited

Definition at line 725 of file KVector.hpp.

template<typename T >
Vector3d< T > slip::Vector3d< T >::operator- ( ) const
inline

Definition at line 467 of file Vector3d.hpp.

self& slip::kvector< T, N >::operator-= ( const T &  val)
inlineinherited

Definition at line 693 of file KVector.hpp.

self& slip::kvector< T, N >::operator-= ( const self rhs)
inlineinherited

Definition at line 732 of file KVector.hpp.

self& slip::kvector< T, N >::operator/= ( const T &  val)
inlineinherited

Definition at line 705 of file KVector.hpp.

self& slip::kvector< T, N >::operator/= ( const self rhs)
inlineinherited

Definition at line 746 of file KVector.hpp.

reference slip::kvector< T, N >::operator[] ( const size_type  n)
inlineinherited

Subscript access to the data contained in the kvector.

Parameters
nThe index of the element for which data should be accessed.
Returns
Read/write reference to data.
Precondition
n < N

This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 633 of file KVector.hpp.

const_reference slip::kvector< T, N >::operator[] ( const size_type  n) const
inlineinherited

Subscript access to the data contained in the kvector.

Parameters
nThe index of the element for which data should be accessed.
Returns
Read-only (constant) reference to data.
Precondition
n < N

This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 646 of file KVector.hpp.

template<typename T >
Vector3d< T > slip::Vector3d< T >::product ( const self other) const
inline

Computes the vector cross product betwin the current Vector3d and the Vector3d other.

Parameters
otherA Vector3d.
Returns
The resulting Vector3d.

Definition at line 608 of file Vector3d.hpp.

reverse_iterator slip::kvector< T, N >::rbegin ( )
inlineinherited

Returns a read/write reverse iterator that points to the last element in the kvector. Iteration is done in reverse element order.

Returns
reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 340 of file KVector.hpp.

const_reverse_iterator slip::kvector< T, N >::rbegin ( ) const
inlineinherited

Returns a read-only (constant) reverse iterator that points to the last element in the kvector. Iteration is done in reverse element order.

Returns
const reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 350 of file KVector.hpp.

reverse_iterator_range slip::kvector< T, N >::rbegin ( const slip::Range< int > &  range)
inlineinherited

Returns a read/write reverse_iterator_range that points the end element within the Range. Iteration is done in reverse element order according to the Range.

Parameters
range.Range to iterate.
Returns
reverse_iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.rbegin(range),A5.rend(range),std::ostream_iterator<double>(std::cout," "));

Definition at line 392 of file KVector.hpp.

const_reverse_iterator_range slip::kvector< T, N >::rbegin ( const slip::Range< int > &  range) const
inlineinherited

Returns a read-only (constant) reverse_iterator_range that points the end element within the Range. Iteration is done in reverse element order according to the Range.

Parameters
range.Range to iterate.
Returns
cons_treverse__iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.rbegin(range),A5.rend(range),std::ostream_iterator<double>(std::cout,"
"));

Definition at line 415 of file KVector.hpp.

reverse_iterator slip::kvector< T, N >::rend ( )
inlineinherited

Returns a read/write reverse iterator that points to one before the first element in the kvector. Iteration is done in reverse element order.

Returns
reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 360 of file KVector.hpp.

const_reverse_iterator slip::kvector< T, N >::rend ( ) const
inlineinherited

Returns a read-only (constant) reverse iterator that points to one before the first element in the kvector. Iteration is done in reverse element order.

Returns
const reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.

Definition at line 371 of file KVector.hpp.

reverse_iterator_range slip::kvector< T, N >::rend ( const slip::Range< int > &  range)
inlineinherited

Returns a read/write reverse_iterator_range that points one previous the first element in the Range. Iteration is done in reverse element order according to the Range.

Parameters
range.Range to iterate.
Returns
reverse_iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.rbegin(range),A5.rend(range),std::ostream_iterator<double>(std::cout," "));

Definition at line 438 of file KVector.hpp.

const_reverse_iterator_range slip::kvector< T, N >::rend ( const slip::Range< int > &  range) const
inlineinherited

Returns a read-only (constant) reverse_iterator_range that points one previous the first element in the Range. Iteration is done in reverse element order according to the Range.

Parameters
range.Range to iterate.
Returns
const_reverse_iterator_range value
Precondition
The range must be inside the whole range of the kvector.
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Range<int> range(1,5,2);
std::copy(A5.rbegin(range),A5.rend(range),std::ostream_iterator<double>(std::cout,"
"));

Definition at line 461 of file KVector.hpp.

template<typename T >
void slip::Vector3d< T >::set ( const T &  x1,
const T &  x2,
const T &  x3 
)
inline

Mutator of the three dimension values of the Vector3d.

Parameters
x1the first dimension value of the Vector3d
x2the second dimension value of the Vector3d
x3the third dimension value of the Vector3d

Definition at line 596 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_x ( const T &  r)
inline

Mutator of the first dimension value of the Vector3d.

Parameters
rthe first dimension value of the Vector3d

Definition at line 561 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_x1 ( const T &  x1)
inline

Mutator of the first dimension value of the Vector3d.

Parameters
x1the first dimension value of the Vector3d

Definition at line 557 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_x2 ( const T &  x2)
inline

Mutator of the second dimension value of the Vector3d.

Parameters
x2the second dimension value of the Vector3d

Definition at line 570 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_x3 ( const T &  x3)
inline

Mutator of the third dimension value of the Vector3d.

Parameters
x3the third dimension value of the Vector3d

Definition at line 583 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_y ( const T &  g)
inline

Mutator of the second dimension value of the Vector3d.

Parameters
gthe second dimension value of the Vector3d

Definition at line 574 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::set_z ( const T &  r)
inline

Mutator of the third dimension value of the Vector3d.

Parameters
rthe third dimension value of the Vector3d

Definition at line 587 of file Vector3d.hpp.

size_type slip::kvector< T, N >::size ( ) const
inlineinherited

Returns the number of elements in the kvector.

Definition at line 766 of file KVector.hpp.

T slip::kvector< T, N >::sum ( ) const
inlineinherited

Returns the sum of the elements of the kvector.

Precondition
size() != 0

Definition at line 822 of file KVector.hpp.

void slip::kvector< T, N >::swap ( kvector< T, 3 > &  x)
inlineinherited

Swaps data with another kvector.

Parameters
xA kvector of the same element type

Definition at line 785 of file KVector.hpp.

template<typename T >
const T & slip::Vector3d< T >::u ( ) const
inline

Accessor to the first dimension value of the Vector3d.

Returns
Returns the first dimension value of the Vector3d

Definition at line 526 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::u ( const T &  u_)
inline

Mutator of the first dimension value of the Vector3d.

Parameters
u_the first dimension value of the Vector3d

Definition at line 565 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::v ( ) const
inline

Accessor to the second dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 539 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::v ( const T &  v_)
inline

Mutator of the second dimension value of the Vector3d.

Parameters
v_the second dimension value of the Vector3d

Definition at line 578 of file Vector3d.hpp.

template<typename T >
const T & slip::Vector3d< T >::w ( ) const
inline

Accessor to the third dimension value of the Vector3d.

Returns
Returns the second dimension value of the Vector3d

Definition at line 552 of file Vector3d.hpp.

template<typename T >
void slip::Vector3d< T >::w ( const T &  w_)
inline

Mutator of the third dimension value of the Vector3d.

Parameters
w_the third dimension value of the Vector3d

Definition at line 591 of file Vector3d.hpp.

Friends And Related Function Documentation

template<typename T>
friend class boost::serialization::access
friend

Definition at line 383 of file Vector3d.hpp.

template<typename T>
bool operator< ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
friend

Less Compare operator.

Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| < ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 480 of file Vector3d.hpp.

template<typename T>
bool operator<= ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
friend

Less equal Compare operator.

Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| <= ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 501 of file Vector3d.hpp.

template<typename T>
bool operator> ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
friend

Greater Compare operator.

Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| > ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 493 of file Vector3d.hpp.

template<typename T>
bool operator> ( const Vector3d< T > &  x,
const Vector3d< T > &  y 
)
friend

Greater equal Compare operator.

Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| >= ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()
Parameters
xfirst Vector3d to compare
ysecond Vector3d to compare return true if ||x|| > ||y||, ||.|| is the Euclidean norm
Precondition
x.dim() == y.dim()

Definition at line 493 of file Vector3d.hpp.

Member Data Documentation

T slip::kvector< T, N >::data[N]
inherited

Data array storage of the kvector.

Definition at line 935 of file KVector.hpp.

const std::size_t slip::kvector< T, N >::DIM
staticinherited

Definition at line 181 of file KVector.hpp.

const std::size_t slip::kvector< T, N >::SIZE
staticinherited

Definition at line 180 of file KVector.hpp.


The documentation for this class was generated from the following file: