MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::Vector< T, N_rows > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::Vector< T, N_rows >:

Public Types

typedef ScalarTypeTraits< T >
::ScalarType 
ScalarType
 
typedef ScalarTypeTraits< T >
::DirectExpressionType 
ExpressionType
 

Public Member Functions

 Vector ()
 
 Vector (index_type N)
 
 Vector (const Vector &oVec)
 
 Vector (const T &v1, const T &v2)
 
template<typename Expr1 , typename Expr2 >
 Vector (const GradientExpression< Expr1 > &v1, const GradientExpression< Expr2 > &v2)
 
 Vector (const T &v1, const T &v2, const T &v3)
 
template<typename Expr1 , typename Expr2 , typename Expr3 >
 Vector (const GradientExpression< Expr1 > &v1, const GradientExpression< Expr2 > &v2, const GradientExpression< Expr3 > &v3)
 
 Vector (const Vec3 &v)
 
template<typename Expression >
 Vector (const VectorExpression< Expression, N_rows > &f)
 
template<typename InitClass >
 Vector (const VectorInit< InitClass, T, N_rows > &func)
 
template<typename T2 >
 Vector (const Vector< T2, N_rows > &v)
 
template<typename T2 >
 Vector (const Vector< T2, N_rows > &v, LocalDofMap *pDofMap)
 
template<typename T2 >
void Copy (const Vector< T2, N_rows > &v, LocalDofMap *pDofMap)
 
void Reset ()
 
void Resize (index_type iNumRows)
 
template<typename Expression >
Vectoroperator= (const VectorExpression< Expression, N_rows > &f)
 
template<typename T_Rhs >
Vectoroperator+= (const Vector< T_Rhs, N_rows > &v)
 
Vectoroperator+= (const Vec3 &v)
 
template<typename T_Rhs >
Vectoroperator-= (const Vector< T_Rhs, N_rows > &v)
 
template<typename Expression >
Vectoroperator+= (const VectorExpression< Expression, N_rows > &f)
 
template<typename Expression >
Vectoroperator-= (const VectorExpression< Expression, N_rows > &f)
 
template<typename T_Rhs >
Vectoroperator*= (const T_Rhs &g)
 
template<typename T_Rhs >
Vectoroperator/= (const T_Rhs &g)
 
template<typename ScalarExpression >
Vectoroperator*= (const GradientExpression< ScalarExpression > &f)
 
template<typename ScalarExpression >
Vectoroperator/= (const GradientExpression< ScalarExpression > &f)
 
Vectoroperator= (const Vec3 &v)
 
const ScalarTypeoperator() (index_type iRow) const
 
ScalarTypeoperator() (index_type iRow)
 
index_type iGetNumRows () const
 
ScalarTypepGetVec ()
 
const ScalarTypepGetVec () const
 
template<typename ScalarType2 >
bool bHaveReferenceTo (const ScalarType2 *pFirst, const ScalarType2 *pLast) const
 

Static Public Attributes

static const index_type iNumRows = N_rows
 
static const index_type iInitNumRows = iNumRows == DYNAMIC_SIZE ? 0 : iNumRows
 

Private Member Functions

const ScalarTypepGetFirstElem () const
 
const ScalarTypepGetLastElem () const
 
template<typename Func , typename U >
void ApplyScalarFunc (const U &a)
 
template<typename Func , typename Expression >
void ApplyMatrixFunc (const VectorExpression< Expression, N_rows > &A)
 
template<typename Func , typename Expression >
void ApplyMatrixFuncNoAlias (const VectorExpression< Expression, N_rows > &A, const Func &)
 
template<typename Func , typename Expression >
void ApplyMatrixFuncAlias (const VectorExpression< Expression, N_rows > &A, const Func &f)
 

Private Attributes

VectorData< ScalarType, N_rows > rgVec
 

Friends

struct MatVecHelp::ApplyAliasHelperMatrix< false >
 
struct MatVecHelp::ApplyAliasHelperMatrix< true >
 

Detailed Description

template<typename T, index_type N_rows>
class grad::Vector< T, N_rows >

Definition at line 95 of file matvec.h.

Member Typedef Documentation

template<typename T, index_type N_rows>
typedef ScalarTypeTraits<T>::DirectExpressionType grad::Vector< T, N_rows >::ExpressionType

Definition at line 2261 of file matvec.h.

template<typename T, index_type N_rows>
typedef ScalarTypeTraits<T>::ScalarType grad::Vector< T, N_rows >::ScalarType

Definition at line 2260 of file matvec.h.

Constructor & Destructor Documentation

template<typename T, index_type N_rows>
grad::Vector< T, N_rows >::Vector ( )
inline

Definition at line 2263 of file matvec.h.

2264  :rgVec(iInitNumRows, true) {
2265  }
static const index_type iInitNumRows
Definition: matvec.h:2259
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
grad::Vector< T, N_rows >::Vector ( index_type  N)
inlineexplicit

Definition at line 2267 of file matvec.h.

2268  :rgVec(N, true) {
2269  }
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
grad::Vector< T, N_rows >::Vector ( const Vector< T, N_rows > &  oVec)
inline

Definition at line 2271 of file matvec.h.

2272  :rgVec(oVec.rgVec) {
2273  }
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
grad::Vector< T, N_rows >::Vector ( const T &  v1,
const T &  v2 
)
inline

Definition at line 2275 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iNumRows.

2276  :rgVec(iInitNumRows, false) {
2277  typedef typename IndexCheck<iNumRows - 2>::CheckType check_iNumRows;
2278 
2279  (*this)(1) = v1;
2280  (*this)(2) = v2;
2281  }
static const index_type iInitNumRows
Definition: matvec.h:2259
static const index_type iNumRows
Definition: matvec.h:2258
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
template<typename Expr1 , typename Expr2 >
grad::Vector< T, N_rows >::Vector ( const GradientExpression< Expr1 > &  v1,
const GradientExpression< Expr2 > &  v2 
)
inline

Definition at line 2284 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iNumRows.

2285  :rgVec(iNumRows, false) {
2286  typedef typename IndexCheck<iNumRows - 2>::CheckType check_iNumRows;
2287 
2288  (*this)(1) = v1;
2289  (*this)(2) = v2;
2290  }
static const index_type iNumRows
Definition: matvec.h:2258
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
grad::Vector< T, N_rows >::Vector ( const T &  v1,
const T &  v2,
const T &  v3 
)
inline

Definition at line 2292 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iNumRows.

2293  :rgVec(iNumRows, false) {
2294  typedef typename IndexCheck<iNumRows - 3>::CheckType check_iNumRows;
2295 
2296  (*this)(1) = v1;
2297  (*this)(2) = v2;
2298  (*this)(3) = v3;
2299  }
static const index_type iNumRows
Definition: matvec.h:2258
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
template<typename Expr1 , typename Expr2 , typename Expr3 >
grad::Vector< T, N_rows >::Vector ( const GradientExpression< Expr1 > &  v1,
const GradientExpression< Expr2 > &  v2,
const GradientExpression< Expr3 > &  v3 
)
inline

Definition at line 2302 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iNumRows.

2303  :rgVec(iNumRows, false) {
2304  typedef typename IndexCheck<iNumRows - 3>::CheckType check_iNumRows;
2305 
2306  (*this)(1) = v1;
2307  (*this)(2) = v2;
2308  (*this)(3) = v3;
2309  }
static const index_type iNumRows
Definition: matvec.h:2258
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T , index_type N_rows>
grad::Vector< T, N_rows >::Vector ( const Vec3 v)
inlineexplicit

Definition at line 2564 of file matvec.h.

References grad::Direct(), and grad::Vector< T, N_rows >::iNumRows.

2565  :rgVec(iNumRows, false) {
2566  using namespace MatVecHelp;
2567 
2568  typedef typename IndexCheck<iNumRows - 3>::CheckType check_iNumRows;
2569 
2570  ApplyMatrixFunc<Assign>(Direct(v));
2571 }
static const index_type iNumRows
Definition: matvec.h:2258
MatrixExpression< MatrixDirectExpr< Matrix< T, N_rows, N_cols > >, N_rows, N_cols > Direct(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2185
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Expression >
grad::Vector< T, N_rows >::Vector ( const VectorExpression< Expression, N_rows > &  f)
inline

Definition at line 2314 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias().

2315  :rgVec(f.iGetNumRows(), false) {
2316  using namespace MatVecHelp;
2317 
2318  ApplyMatrixFuncNoAlias(f, Assign());
2319  }
void ApplyMatrixFuncNoAlias(const VectorExpression< Expression, N_rows > &A, const Func &)
Definition: matvec.h:2526
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename InitClass >
grad::Vector< T, N_rows >::Vector ( const VectorInit< InitClass, T, N_rows > &  func)
inlineexplicit

Definition at line 2322 of file matvec.h.

2323  :rgVec(func.iGetNumRows(), false) {
2324  func.Initialize(*this);
2325  }
void func(const T &u, const T &v, const T &w, doublereal e, T &f)
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
template<typename T2 >
grad::Vector< T, N_rows >::Vector ( const Vector< T2, N_rows > &  v)
inlineexplicit

Definition at line 2328 of file matvec.h.

References grad::Convert(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), grad::Vector< T, N_rows >::iGetNumRows(), and MATVEC_ASSERT.

2329  :rgVec(v.iGetNumRows(), false) {
2330 
2331  MATVEC_ASSERT(v.iGetNumRows() == iGetNumRows());
2332 
2333  for (index_type i = 1; i <= v.iGetNumRows(); ++i) {
2334  grad::Convert((*this)(i), v(i));
2335  }
2336  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
integer index_type
Definition: gradient.h:104
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
index_type iGetNumRows() const
Definition: matvec.h:2480
void Convert(scalar_func_type &d, const Gradient< N_SIZE > &g)
Definition: gradient.h:2855

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename T2 >
grad::Vector< T, N_rows >::Vector ( const Vector< T2, N_rows > &  v,
LocalDofMap pDofMap 
)
inline

Definition at line 2339 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::Copy().

2340  :rgVec(v.iGetNumRows(), false) {
2341 
2342  Copy(v, pDofMap);
2343  }
void Copy(const Vector< T2, N_rows > &v, LocalDofMap *pDofMap)
Definition: matvec.h:2346
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542

Here is the call graph for this function:

Member Function Documentation

template<typename T, index_type N_rows>
template<typename Func , typename Expression >
void grad::Vector< T, N_rows >::ApplyMatrixFunc ( const VectorExpression< Expression, N_rows > &  A)
inlineprivate

Definition at line 2519 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFunc().

2519  {
2520  using namespace MatVecHelp;
2521 
2522  ApplyAliasHelperMatrix<VectorExpression<Expression, N_rows>::bAlias>::ApplyMatrixFunc(*this, A, Func());
2523  }
void ApplyMatrixFunc(const VectorExpression< Expression, N_rows > &A)
Definition: matvec.h:2519

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Func , typename Expression >
void grad::Vector< T, N_rows >::ApplyMatrixFuncAlias ( const VectorExpression< Expression, N_rows > &  A,
const Func &  f 
)
inlineprivate

Definition at line 2537 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias().

2537  {
2538  ApplyMatrixFuncNoAlias(VectorExpression<VectorDirectExpr<Vector>, N_rows>(Vector(A)), f);
2539  }
void ApplyMatrixFuncNoAlias(const VectorExpression< Expression, N_rows > &A, const Func &)
Definition: matvec.h:2526

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Func , typename Expression >
void grad::Vector< T, N_rows >::ApplyMatrixFuncNoAlias ( const VectorExpression< Expression, N_rows > &  A,
const Func &   
)
inlineprivate

Definition at line 2526 of file matvec.h.

References grad::VectorExpression< Expression, N_rows >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, grad::Matrix< T, N_rows, N_cols >::pGetFirstElem(), and grad::Matrix< T, N_rows, N_cols >::pGetLastElem().

2526  {
2527  MATVEC_ASSERT((N_rows == A.iGetNumRows()) || (N_rows == DYNAMIC_SIZE && A.iGetNumRows() >= 0));
2528  MATVEC_ASSERT(A.iGetNumRows() == iGetNumRows());
2529  MATVEC_ASSERT(!A.bHaveReferenceTo(pGetFirstElem(), pGetLastElem()));
2530 
2531  for (index_type i = 1; i <= iGetNumRows(); ++i) {
2532  Func::Eval((*this)(i), A(i));
2533  }
2534  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
const ScalarType * pGetLastElem() const
Definition: matvec.h:2504
const ScalarType * pGetFirstElem() const
Definition: matvec.h:2500
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
integer index_type
Definition: gradient.h:104
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Func , typename U >
void grad::Vector< T, N_rows >::ApplyScalarFunc ( const U &  a)
inlineprivate

Definition at line 2512 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows().

2512  {
2513  for (index_type i = 1; i <= iGetNumRows(); ++i) {
2514  Func::Eval((*this)(i), a);
2515  }
2516  }
integer index_type
Definition: gradient.h:104
index_type iGetNumRows() const
Definition: matvec.h:2480
static const doublereal a
Definition: hfluid_.h:289

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename ScalarType2 >
bool grad::Vector< T, N_rows >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 2492 of file matvec.h.

References grad::bArrayOverlap(), grad::Matrix< T, N_rows, N_cols >::pGetFirstElem(), and grad::Matrix< T, N_rows, N_cols >::pGetLastElem().

2492  {
2493  return bArrayOverlap(pGetFirstElem(),
2494  pGetLastElem(),
2495  pFirst,
2496  pLast);
2497  }
const ScalarType * pGetLastElem() const
Definition: matvec.h:2504
const ScalarType * pGetFirstElem() const
Definition: matvec.h:2500
bool bArrayOverlap(const ScalarType *pFirstArray1, const ScalarType *pLastArray1, const ScalarType *pFirstArray2, const ScalarType *pLastArray2)
Definition: matvec.h:430

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename T2 >
void grad::Vector< T, N_rows >::Copy ( const Vector< T2, N_rows > &  v,
LocalDofMap pDofMap 
)
inline

Definition at line 2346 of file matvec.h.

References grad::Copy(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), grad::Vector< T, N_rows >::iGetNumRows(), and MATVEC_ASSERT.

2346  {
2347  rgVec.Resize(v.iGetNumRows());
2348 
2349  MATVEC_ASSERT(v.iGetNumRows() == iGetNumRows());
2350 
2351  for (index_type i = 1; i <= iGetNumRows(); ++i) {
2352  grad::Copy((*this)(i), v(i), pDofMap);
2353  }
2354  }
void Resize(index_type iNumRows)
Definition: matvec.h:1665
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
integer index_type
Definition: gradient.h:104
void Copy(scalar_func_type &d1, const scalar_func_type &d2, LocalDofMap *)
Definition: gradient.h:2827
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
const ScalarType& grad::Vector< T, N_rows >::operator() ( index_type  iRow) const
inline

Definition at line 2466 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.

2466  {
2467  --iRow; // Row index is 1-based for compatibility reasons
2468  MATVEC_ASSERT(iRow >= 0);
2469  MATVEC_ASSERT(iRow < iGetNumRows());
2470  return rgVec[iRow];
2471  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
ScalarType& grad::Vector< T, N_rows >::operator() ( index_type  iRow)
inline

Definition at line 2473 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.

2473  {
2474  --iRow; // Row index is 1-based for compatibility reasons
2475  MATVEC_ASSERT(iRow >= 0);
2476  MATVEC_ASSERT(iRow < iGetNumRows());
2477  return rgVec[iRow];
2478  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename T_Rhs >
Vector& grad::Vector< T, N_rows >::operator*= ( const T_Rhs &  g)
inline

Definition at line 2429 of file matvec.h.

2429  {
2430  using namespace MatVecHelp;
2431 
2432  ApplyScalarFunc<Mul>(g);
2433 
2434  return *this;
2435  }
template<typename T, index_type N_rows>
template<typename ScalarExpression >
Vector& grad::Vector< T, N_rows >::operator*= ( const GradientExpression< ScalarExpression > &  f)
inline

Definition at line 2447 of file matvec.h.

2447  {
2448  using namespace MatVecHelp;
2449 
2450  ApplyScalarFunc<Mul>(ScalarType(f));
2451 
2452  return *this;
2453  }
ScalarTypeTraits< T >::ScalarType ScalarType
Definition: matvec.h:2260
template<typename T, index_type N_rows>
template<typename T_Rhs >
Vector& grad::Vector< T, N_rows >::operator+= ( const Vector< T_Rhs, N_rows > &  v)
inline

Definition at line 2378 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), grad::Vector< T, N_rows >::iGetNumRows(), and MATVEC_ASSERT.

2378  {
2379  MATVEC_ASSERT(v.iGetNumRows() == iGetNumRows());
2380  using namespace MatVecHelp;
2381 
2382  ApplyMatrixFunc<Add>(VectorExpression<VectorDirectExpr<Vector<T_Rhs, N_rows> >, N_rows>(v));
2383 
2384  return *this;
2385  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
Vector& grad::Vector< T, N_rows >::operator+= ( const Vec3 v)
inline

Definition at line 2387 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.

2387  {
2388  MATVEC_ASSERT(iGetNumRows() == 3);
2389  typedef typename MaxSizeCheck<iNumRows == 3 || iNumRows == DYNAMIC_SIZE>::CheckType check_iNumRows;
2390 
2391  using namespace MatVecHelp;
2392 
2393  ApplyMatrixFunc<Add>(VectorExpression<Vec3DirectExpr, N_rows>(v));
2394 
2395  return *this;
2396  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Expression >
Vector& grad::Vector< T, N_rows >::operator+= ( const VectorExpression< Expression, N_rows > &  f)
inline

Definition at line 2409 of file matvec.h.

References grad::VectorExpression< Expression, N_rows >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.

2409  {
2410  MATVEC_ASSERT(f.iGetNumRows() == iGetNumRows());
2411  using namespace MatVecHelp;
2412 
2413  ApplyMatrixFunc<Add>(f);
2414 
2415  return *this;
2416  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename T_Rhs >
Vector& grad::Vector< T, N_rows >::operator-= ( const Vector< T_Rhs, N_rows > &  v)
inline

Definition at line 2399 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), grad::Vector< T, N_rows >::iGetNumRows(), and MATVEC_ASSERT.

2399  {
2400  MATVEC_ASSERT(v.iGetNumRows() == iGetNumRows());
2401  using namespace MatVecHelp;
2402 
2403  ApplyMatrixFunc<Sub>(VectorExpression<VectorDirectExpr<Vector<T_Rhs, N_rows> >, N_rows>(v));
2404 
2405  return *this;
2406  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename Expression >
Vector& grad::Vector< T, N_rows >::operator-= ( const VectorExpression< Expression, N_rows > &  f)
inline

Definition at line 2419 of file matvec.h.

References grad::VectorExpression< Expression, N_rows >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.

2419  {
2420  MATVEC_ASSERT(f.iGetNumRows() == iGetNumRows());
2421  using namespace MatVecHelp;
2422 
2423  ApplyMatrixFunc<Sub>(f);
2424 
2425  return *this;
2426  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
template<typename T_Rhs >
Vector& grad::Vector< T, N_rows >::operator/= ( const T_Rhs &  g)
inline

Definition at line 2438 of file matvec.h.

2438  {
2439  using namespace MatVecHelp;
2440 
2441  ApplyScalarFunc<Div>(g);
2442 
2443  return *this;
2444  }
template<typename T, index_type N_rows>
template<typename ScalarExpression >
Vector& grad::Vector< T, N_rows >::operator/= ( const GradientExpression< ScalarExpression > &  f)
inline

Definition at line 2456 of file matvec.h.

2456  {
2457  using namespace MatVecHelp;
2458 
2459  ApplyScalarFunc<Div>(ScalarType(f));
2460 
2461  return *this;
2462  }
ScalarTypeTraits< T >::ScalarType ScalarType
Definition: matvec.h:2260
template<typename T, index_type N_rows>
template<typename Expression >
Vector& grad::Vector< T, N_rows >::operator= ( const VectorExpression< Expression, N_rows > &  f)
inline

Definition at line 2367 of file matvec.h.

References grad::VectorExpression< Expression, N_rows >::iGetNumRows(), and grad::Vector< T, N_rows >::Resize().

2367  {
2368  rgVec.Resize(f.iGetNumRows());
2369 
2370  using namespace MatVecHelp;
2371 
2372  ApplyMatrixFunc<Assign>(f);
2373 
2374  return *this;
2375  }
void Resize(index_type iNumRows)
Definition: matvec.h:1665
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542

Here is the call graph for this function:

template<typename T , index_type N_rows>
Vector< T, N_rows > & grad::Vector< T, N_rows >::operator= ( const Vec3 v)
inline

Definition at line 2575 of file matvec.h.

References grad::Direct().

2575  {
2576  using namespace MatVecHelp;
2577 
2578  ApplyMatrixFunc<Assign>(Direct(v));
2579 
2580  return *this;
2581 }
MatrixExpression< MatrixDirectExpr< Matrix< T, N_rows, N_cols > >, N_rows, N_cols > Direct(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2185

Here is the call graph for this function:

template<typename T, index_type N_rows>
const ScalarType* grad::Vector< T, N_rows >::pGetFirstElem ( ) const
inlineprivate

Definition at line 2500 of file matvec.h.

2500  {
2501  return rgVec.pGetFirstElem();
2502  }
const T * pGetFirstElem() const
Definition: matvec.h:1669
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
const ScalarType* grad::Vector< T, N_rows >::pGetLastElem ( ) const
inlineprivate

Definition at line 2504 of file matvec.h.

2504  {
2505  return rgVec.pGetLastElem();
2506  }
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
const T * pGetLastElem() const
Definition: matvec.h:1673
template<typename T, index_type N_rows>
ScalarType* grad::Vector< T, N_rows >::pGetVec ( )
inline

Definition at line 2488 of file matvec.h.

Referenced by callFunc(), callFunc2(), and func2ad().

2488 { return &rgVec[0]; }
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542
template<typename T, index_type N_rows>
const ScalarType* grad::Vector< T, N_rows >::pGetVec ( ) const
inline

Definition at line 2489 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::pGetFirstElem().

2489 { return pGetFirstElem(); }
const ScalarType * pGetFirstElem() const
Definition: matvec.h:2500

Here is the call graph for this function:

template<typename T, index_type N_rows>
void grad::Vector< T, N_rows >::Reset ( void  )
inline

Definition at line 2356 of file matvec.h.

References grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and grad::Reset().

Referenced by testMatVecCopy(), and testMatVecProductGradient().

2356  {
2357  for (index_type i = 1; i <= iGetNumRows(); ++i) {
2358  grad::Reset((*this)(i));
2359  }
2360  }
integer index_type
Definition: gradient.h:104
void Reset(scalar_func_type &d)
Definition: gradient.h:2836
index_type iGetNumRows() const
Definition: matvec.h:2480

Here is the call graph for this function:

template<typename T, index_type N_rows>
void grad::Vector< T, N_rows >::Resize ( index_type  iNumRows)
inline

Definition at line 2362 of file matvec.h.

Referenced by grad::Vector< T, N_rows >::operator=().

2362  {
2364  }
void Resize(index_type iNumRows)
Definition: matvec.h:1665
static const index_type iNumRows
Definition: matvec.h:2258
VectorData< ScalarType, N_rows > rgVec
Definition: matvec.h:2542

Friends And Related Function Documentation

template<typename T, index_type N_rows>
friend struct MatVecHelp::ApplyAliasHelperMatrix< false >
friend

Definition at line 2508 of file matvec.h.

template<typename T, index_type N_rows>
friend struct MatVecHelp::ApplyAliasHelperMatrix< true >
friend

Definition at line 2509 of file matvec.h.

Member Data Documentation

template<typename T, index_type N_rows>
const index_type grad::Vector< T, N_rows >::iInitNumRows = iNumRows == DYNAMIC_SIZE ? 0 : iNumRows
static

Definition at line 2259 of file matvec.h.

template<typename T, index_type N_rows>
VectorData<ScalarType, N_rows> grad::Vector< T, N_rows >::rgVec
private

Definition at line 2542 of file matvec.h.


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