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::Vector4d< T > Class Template Reference

This is a Vector4d struct. It is a specialization of kvector. It implements some specific 4d operations. More...

#include <Vector4d.hpp>

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

Public Types

typedef Vector4d< 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
 Vector4d ()
 Default constructor init all the components to 0. More...
 
 Vector4d (const T &val)
 Constructor init all the components to val. More...
 
 Vector4d (const T &x1, const T &x2, const T &x3, const T &x4)
 Constructor init all the components to val. More...
 
 Vector4d (const T *val)
 Constructor init the Vector4d with the val array. More...
 
 Vector4d (const Vector4d< T > &rhs)
 Copy constructor init the Vector4d with another Vector4d. More...
 
Accesors
const T & get_x1 () const
 Accessor to the first dimension value of the Vector4d. More...
 
const T & get_x () const
 Accessor to the first dimension value of the Vector4d. More...
 
const T & u () const
 Accessor to the first dimension value of the Vector4d. More...
 
const T & get_x2 () const
 Accessor to the second dimension value of the Vector4d. More...
 
const T & get_y () const
 Accessor to the second dimension value of the Vector4d. More...
 
const T & v () const
 Accessor to the second dimension value of the Vector4d. More...
 
const T & get_x3 () const
 Accessor to the third dimension value of the Vector4d. More...
 
const T & get_z () const
 Accessor to the third dimension value of the Vector4d. More...
 
const T & w () const
 Accessor to the third dimension value of the Vector4d. More...
 
const T & get_x4 () const
 Accessor to the fourth dimension value of the Vector4d. More...
 
const T & get_t () const
 Accessor to the fourth dimension value of the Vector4d. More...
 
const T & t () const
 Accessor to the fourth dimension value of the Vector4d. More...
 
void set_x1 (const T &x1)
 Mutator of the first dimension value of the Vector4d. More...
 
void set_x (const T &r)
 Mutator of the first dimension value of the Vector4d. More...
 
void u (const T &u_)
 Mutator of the first dimension value of the Vector4d. More...
 
void set_x2 (const T &x2)
 Mutator of the second dimension value of the Vector4d. More...
 
void set_y (const T &g)
 Mutator of the second dimension value of the Vector4d. More...
 
void v (const T &v_)
 Mutator of the second dimension value of the Vector4d. More...
 
void set_x3 (const T &x3)
 Mutator of the third dimension value of the Vector4d. More...
 
void set_z (const T &r)
 Mutator of the third dimension value of the Vector4d. More...
 
void w (const T &w_)
 Mutator of the third dimension value of the Vector4d. More...
 
void set_x4 (const T &x4)
 Mutator of the fourth dimension value of the Vector4d. More...
 
void set_t (const T &s)
 Mutator of the fourth dimension value of the Vector4d. More...
 
void t (const T &x_)
 Mutator of the fourth dimension value of the Vector4d. More...
 
void set (const T &x1, const T &x2, const T &x3, const T &x4)
 Mutator of the three dimension values of the Vector4d. 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 Vector4d< T > &x, const Vector4d< T > &y)
 Less Compare operator. More...
 
bool operator> (const Vector4d< T > &x, const Vector4d< T > &y)
 Greater Compare operator. More...
 
bool operator<= (const Vector4d< T > &x, const Vector4d< T > &y)
 Less equal Compare operator. More...
 
bool operator> (const Vector4d< T > &x, const Vector4d< T > &y)
 Greater equal Compare operator. More...
 

Detailed Description

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

This is a Vector4d struct. It is a specialization of kvector. It implements some specific 4d operations.

Version
Fluex 1.0
Date
2013/07/04
Version
0.0.2
Date
2014/04/05
Since
1.4.0
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
Parameters
TType of the Vector4d

Definition at line 96 of file Vector4d.hpp.

Member Typedef Documentation

Definition at line 178 of file KVector.hpp.

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

Definition at line 138 of file Vector4d.hpp.

Definition at line 165 of file KVector.hpp.

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

Definition at line 130 of file Vector4d.hpp.

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

Definition at line 132 of file Vector4d.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::Vector4d< T >::difference_type

Definition at line 134 of file Vector4d.hpp.

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

Definition at line 137 of file Vector4d.hpp.

Definition at line 164 of file KVector.hpp.

Definition at line 173 of file KVector.hpp.

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

Definition at line 129 of file Vector4d.hpp.

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

Definition at line 131 of file Vector4d.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 Vector4d<T> slip::Vector4d< T >::self

Definition at line 127 of file Vector4d.hpp.

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

Definition at line 135 of file Vector4d.hpp.

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

Definition at line 128 of file Vector4d.hpp.

Constructor & Destructor Documentation

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

Default constructor init all the components to 0.

Definition at line 443 of file Vector4d.hpp.

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

Constructor init all the components to val.

Parameters
valinitial value

Definition at line 450 of file Vector4d.hpp.

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

Constructor init all the components to val.

Parameters
x1initial value of the first Vector4d dimension
x2initial value of the second Vector4d dimension
x3initial value of the third Vector4d dimension
x4initial value of the third Vector4d dimension

Definition at line 457 of file Vector4d.hpp.

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

Constructor init the Vector4d with the val array.

Parameters
valinitial value

Definition at line 470 of file Vector4d.hpp.

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

Copy constructor init the Vector4d with another Vector4d.

Parameters
rhsThe other Vector4d

Definition at line 479 of file Vector4d.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.

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::Vector4d< T >::get_t ( ) const
inline

Accessor to the fourth dimension value of the Vector4d.

Returns
Returns the fourth dimension value of the Vector4d

Definition at line 578 of file Vector4d.hpp.

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

Accessor to the first dimension value of the Vector4d.

Returns
Returns the first dimension value of the Vector4d

Definition at line 540 of file Vector4d.hpp.

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

Accessor to the first dimension value of the Vector4d.

Returns
Returns the first dimension value of the Vector4d

Definition at line 536 of file Vector4d.hpp.

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

Accessor to the second dimension value of the Vector4d.

Returns
Returns the second dimension value of the Vector4d

Definition at line 549 of file Vector4d.hpp.

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

Accessor to the third dimension value of the Vector4d.

Returns
Returns the third dimension value of the Vector4d

Definition at line 562 of file Vector4d.hpp.

template<typename T >
const T & slip::Vector4d< T >::get_x4 ( ) const
inline

Accessor to the fourth dimension value of the Vector4d.

Returns
Returns the fourth dimension value of the Vector4d

Definition at line 574 of file Vector4d.hpp.

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

Accessor to the second dimension value of the Vector4d.

Returns
Returns the second dimension value of the Vector4d

Definition at line 553 of file Vector4d.hpp.

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

Accessor to the third dimension value of the Vector4d.

Returns
Returns the third dimension value of the Vector4d

Definition at line 566 of file Vector4d.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::Vector4d< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 778 of file Vector4d.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 >
Vector4d< T > slip::Vector4d< T >::operator- ( ) const
inline

Definition at line 486 of file Vector4d.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.

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::Vector4d< T >::set ( const T &  x1,
const T &  x2,
const T &  x3,
const T &  x4 
)
inline

Mutator of the three dimension values of the Vector4d.

Parameters
x1the first dimension value of the Vector4d
x2the second dimension value of the Vector4d
x3the third dimension value of the Vector4d
x4the fourth dimension value of the Vector4d

Definition at line 637 of file Vector4d.hpp.

template<typename T >
void slip::Vector4d< T >::set_t ( const T &  s)
inline

Mutator of the fourth dimension value of the Vector4d.

Parameters
sthe fourth dimension value of the Vector4d

Definition at line 629 of file Vector4d.hpp.

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

Mutator of the first dimension value of the Vector4d.

Parameters
rthe first dimension value of the Vector4d

Definition at line 591 of file Vector4d.hpp.

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

Mutator of the first dimension value of the Vector4d.

Parameters
x1the first dimension value of the Vector4d

Definition at line 587 of file Vector4d.hpp.

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

Mutator of the second dimension value of the Vector4d.

Parameters
x2the second dimension value of the Vector4d

Definition at line 600 of file Vector4d.hpp.

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

Mutator of the third dimension value of the Vector4d.

Parameters
x3the third dimension value of the Vector4d

Definition at line 613 of file Vector4d.hpp.

template<typename T >
void slip::Vector4d< T >::set_x4 ( const T &  x4)
inline

Mutator of the fourth dimension value of the Vector4d.

Parameters
x4the fourth dimension value of the Vector4d

Definition at line 625 of file Vector4d.hpp.

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

Mutator of the second dimension value of the Vector4d.

Parameters
gthe second dimension value of the Vector4d

Definition at line 604 of file Vector4d.hpp.

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

Mutator of the third dimension value of the Vector4d.

Parameters
rthe third dimension value of the Vector4d

Definition at line 617 of file Vector4d.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, 4 > &  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::Vector4d< T >::t ( ) const
inline

Accessor to the fourth dimension value of the Vector4d.

Returns
Returns the fourth dimension value of the Vector4d

Definition at line 582 of file Vector4d.hpp.

template<typename T >
void slip::Vector4d< T >::t ( const T &  x_)
inline

Mutator of the fourth dimension value of the Vector4d.

Parameters
x_the fourth dimension value of the Vector4d

Definition at line 633 of file Vector4d.hpp.

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

Accessor to the first dimension value of the Vector4d.

Returns
Returns the first dimension value of the Vector4d

Definition at line 544 of file Vector4d.hpp.

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

Mutator of the first dimension value of the Vector4d.

Parameters
u_the first dimension value of the Vector4d

Definition at line 595 of file Vector4d.hpp.

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

Accessor to the second dimension value of the Vector4d.

Returns
Returns the second dimension value of the Vector4d

Definition at line 557 of file Vector4d.hpp.

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

Mutator of the second dimension value of the Vector4d.

Parameters
v_the second dimension value of the Vector4d

Definition at line 608 of file Vector4d.hpp.

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

Accessor to the third dimension value of the Vector4d.

Returns
Returns the third dimension value of the Vector4d

Definition at line 570 of file Vector4d.hpp.

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

Mutator of the third dimension value of the Vector4d.

Parameters
w_the third dimension value of the Vector4d

Definition at line 621 of file Vector4d.hpp.

Friends And Related Function Documentation

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

Definition at line 400 of file Vector4d.hpp.

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

Less Compare operator.

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

Definition at line 499 of file Vector4d.hpp.

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

Less equal Compare operator.

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

Definition at line 519 of file Vector4d.hpp.

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

Greater Compare operator.

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

Definition at line 511 of file Vector4d.hpp.

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

Greater equal Compare operator.

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

Definition at line 511 of file Vector4d.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: