Documentation


vector-vector
[Linear algebra]


Detailed Description

operations involving two vectors: sum, weighted sum, dot product, corss product, etc.


Functions

template<class Cont1, class Cont2> void animal::v_eq (Cont1 &Y, const Cont2 &X)
 $ Y = X $

template<class Cont1, class Cont2> void animal::v_eq_minus (Cont1 &Y, const Cont2 &X)
 $ Y = -X $

template<class Cont1, class Cont2, class Real> void animal::v_eq_ab (Cont1 &Y, const Real &a, const Cont2 &X)
 $ Y = aX $

template<class Cont1, class Cont2, class Cont3> void animal::v_eq_apb (Cont1 &Y, const Cont2 &W, const Cont3 &X)
 $ Y = W + X $

template<class Cont1, class Cont2, class Cont3> void animal::v_eq_amb (Cont1 &Y, const Cont2 &W, const Cont3 &X)
 $ Y = W - X $

template<class Cont1, class Cont2, class Cont3, class Entry> void animal::v_eq (Cont1 &Y, const Cont2 &W, const Entry &a, const Cont3 &X)
 $ Y = W + aX $

template<class Cont1, class Cont2> void animal::v_peq (Cont1 &Y, const Cont2 &X)
 $ Y += X $

template<class Cont> void animal::v_meq (Cont &Y, const Cont &X)
 $ Y -= X $

template<class Cont> void animal::v_peq (Cont &y, typename container_traits< Cont >::value_type a, const Cont &x)
 $ Y += aX $

template<class Cont> void animal::v_meq (Cont &y, typename container_traits< Cont >::value_type a, const Cont &x)
 $ Y -= aX $

template<class Cont, class Real> void animal::v_peq_ab (Cont &y, Real a, const Cont &x)
 $ Y += aX $

template<class V1, class V2, class V3> void animal::v_eq_cross (V1 &u, const V2 &v, const V3 &w)
 Cross product of two vectors: $ u = v \times w $ (generalisation of cross product in dimension 3). (Precond: &u!=&v and &u!=&w).

template<class V1, class V2, class V3> void animal::v_peq_cross (V1 &u, const V2 &v, const V3 &w)
 Add cross product of two vectors: $ u += v \times w $ . (Precond: &u!=&v and &u!=&w).

template<class V1, class V2, class V3> void animal::v_meq_cross (V1 &u, const V2 &v, const V3 &w)
 Substract cross product of two vectors: $ u -= v \times w $ . (Precond: &u!=&v and &u!=&w).

template<class Cont> value_type< Cont >::type animal::v_dot (const Cont &x, const Cont &y)
 dot product of two vectors


Function Documentation

template<class Cont>
value_type<Cont>::type v_dot const Cont &  x,
const Cont &  y
[inline]
 

dot product of two vectors

Definition at line 372 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

Referenced by animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::accumulateSpringForce(), animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::accumulateSpringForceAndGradientMatrix(), animal::OdeImplicitSolver< t_Positions, t_Vector, t_Real >::compute_implicit_euler_step(), dot(), animal::findClosestPointToLine(), animal::OdeImplicitSolver< t_Positions, t_Vector, t_Real >::implicit_euler(), animal::Array< 2, float >::operator *(), animal::v_dot(), animal::v_norm(), and animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::v_peq_h_dfdx_x().

template<class Cont1, class Cont2, class Cont3, class Entry>
void v_eq Cont1 &  Y,
const Cont2 &  W,
const Entry &  a,
const Cont3 &  X
[inline]
 

$ Y = W + aX $

Examples:
linear_test.cpp, matrix_test.cpp, and odeSolver_test.cpp.

Definition at line 264 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont1, class Cont2>
void v_eq Cont1 &  Y,
const Cont2 &  X
[inline]
 

$ Y = X $

Definition at line 205 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont1, class Cont2, class Real>
void v_eq_ab Cont1 &  Y,
const Real &  a,
const Cont2 &  X
[inline]
 

$ Y = aX $

Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 227 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont1, class Cont2, class Cont3>
void v_eq_amb Cont1 &  Y,
const Cont2 &  W,
const Cont3 &  X
[inline]
 

$ Y = W - X $

Definition at line 251 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont1, class Cont2, class Cont3>
void v_eq_apb Cont1 &  Y,
const Cont2 &  W,
const Cont3 &  X
[inline]
 

$ Y = W + X $

Definition at line 238 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class V1, class V2, class V3>
void v_eq_cross V1 &  u,
const V2 &  v,
const V3 &  w
[inline]
 

Cross product of two vectors: $ u = v \times w $ (generalisation of cross product in dimension 3). (Precond: &u!=&v and &u!=&w).

Definition at line 332 of file linear.h.

References animal::size().

Referenced by cross().

template<class Cont1, class Cont2>
void v_eq_minus Cont1 &  Y,
const Cont2 &  X
[inline]
 

$ Y = -X $

Definition at line 216 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont>
void v_meq Cont &  y,
typename container_traits< Cont >::value_type  a,
const Cont &  x
[inline]
 

$ Y -= aX $

Examples:
linear_test.cpp, and matrix_test.cpp.

Definition at line 310 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont>
void v_meq Cont &  Y,
const Cont &  X
[inline]
 

$ Y -= X $

Definition at line 288 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

Referenced by animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::accumulateSpringForce(), animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::accumulateSpringForceAndGradientMatrix(), animal::MassSpringSolver< X3DTK::MFVec3f, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFFloat, X3DTK::MFInt32 >::create_rest_lengths(), animal::findClosestPointToLine(), animal::Array< 2, float >::operator-=(), and animal::MassSpringSolver< t_Positions, t_Vector, t_InvMasses, t_VecReal, t_VecIndex >::v_peq_h_dfdx_x().

template<class V1, class V2, class V3>
void v_meq_cross V1 &  u,
const V2 &  v,
const V3 &  w
[inline]
 

Substract cross product of two vectors: $ u -= v \times w $ . (Precond: &u!=&v and &u!=&w).

Definition at line 358 of file linear.h.

References animal::size().

template<class Cont>
void v_peq Cont &  y,
typename container_traits< Cont >::value_type  a,
const Cont &  x
[inline]
 

$ Y += aX $

Examples:
linear_test.cpp, matrix_test.cpp, and odeSolver_test.cpp.

Definition at line 299 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont1, class Cont2>
void v_peq Cont1 &  Y,
const Cont2 &  X
[inline]
 

$ Y += X $

Definition at line 277 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

template<class Cont, class Real>
void v_peq_ab Cont &  y,
Real  a,
const Cont &  x
[inline]
 

$ Y += aX $

Definition at line 321 of file linear.h.

References animal::begin(), animal::end(), and animal::size().

Referenced by animal::MorphingEngine< Morphings, Real >::computeCatmullRomInterpolation(), and animal::MorphingEngine< Morphings, Real >::computeLinearInterpolation().

template<class V1, class V2, class V3>
void v_peq_cross V1 &  u,
const V2 &  v,
const V3 &  w
[inline]
 

Add cross product of two vectors: $ u += v \times w $ . (Precond: &u!=&v and &u!=&w).

Definition at line 345 of file linear.h.

References animal::size().


Generated on Thu Dec 23 13:52:29 2004 by doxygen 1.3.6