ASL  0.1.7
Advanced Simulation Library
Public Types | Public Member Functions | Related Functions | List of all members
asl::AVec< T > Class Template Reference

#include <aslDataInc.h>

Inheritance diagram for asl::AVec< T >:
Inheritance graph
[legend]

Public Types

typedef T Type
 

Public Member Functions

 AVec ()
 
 AVec (unsigned int s)
 
 AVec (unsigned int s, T a)
 
 ~AVec ()
 
template<typename Tv >
 AVec (const AVec< Tv > &a)
 
 AVec (const AVec< T > &a)
 
template<typename Tv >
const AVec< T > & operator= (const AVec< Tv > &a)
 
template<typename Tv >
const AVec< T > & operator= (const std::vector< Tv > &a)
 
const AVec< T > & operator= (const AVec< T > &a)
 
T & operator[] (unsigned int i)
 
const T & operator[] (unsigned int i) const
 
const unsigned int & getSize () const
 
void resize (unsigned int newSize)
 

Related Functions

(Note that these are not member functions.)

template<typename T >
const unsigned int nD (const AVec< T > a)
 
template<typename T >
AVec< T > makeAVec (T a1)
 
template<typename T >
AVec< T > makeAVec (T a1, T a2)
 
template<typename T >
AVec< T > makeAVec (T a1, T a2, T a3)
 
template<typename T >
AVec< T > makeAVec (T a1, T a2, T a3, T a4)
 
template<typename T >
std::ostream & operator<< (std::ostream &output, const AVec< T > &a)
 
template<typename T1 , typename T2 >
bool compatibleSizes (AVec< T1 > a, AVec< T2 > b)
 The function checks whether the sizes are equal. More...
 
template<typename T >
const T l2 (const AVec< T > &a)
 
template<typename T >
const AVec normalize (const AVec< T > &a)
 
template<typename T >
const AVec< T > operator+ (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > operator- (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > operator- (const AVec< T > &a)
 
template<typename T >
const T operator* (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > operator* (const T &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > operator* (const AVec< T > &a, const T &b)
 
template<typename T >
const AVec< T > operator/ (const AVec< T > &a, const T &b)
 
template<typename T >
const AVec< T > & operator+= (AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > & operator-= (AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > & operator*= (AVec< T > &a, const T &b)
 
template<typename T >
const bool operator== (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const bool operator!= (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const AVec< T > crossProduct (const AVec< T > &a, const AVec< T > &b)
 
template<typename T >
const T minComponent (const AVec< T > &a)
 returns minimal component More...
 
template<typename T >
const T maxComponent (const AVec< T > &a)
 returns maximal component More...
 
template<typename T >
sumOfElements (const AVec< T > &a)
 returns summ of all components More...
 
template<typename T >
productOfElements (const AVec< T > &a)
 returns product of all components More...
 
template<typename T >
const AVec< T > productOfElements (const AVec< T > &a, const AVec< T > &b)
 returns vector which elements are product of corresponding elements of a and b More...
 
template<typename T >
const AVec< T > divisionOfElements (const AVec< T > &a, const AVec< T > &b)
 returns vector which elements are division of corresponding elements of a and b More...
 
template<typename T >
const bool positive (const AVec< T > &a)
 returns true in case when all components of a more or then 0 More...
 
template<typename T >
const bool nonNegative (const AVec< T > &a)
 returns true in case when all components of a more or equal 0 More...
 
const AVec< int > floor (const AVec<> &a)
 returns true in case when all components of a more then 0 More...
 
const AVec< int > round (const AVec<> &a)
 returns true in case when all components of a more then 0 More...
 
double computePolynom (double x, AVec<> &coefs)
 computes polynom for x with coefs More...
 
template<typename T >
std::ostream & operator<< (std::ostream &output, const AVec< T > &a)
 
const AVec swapXZ (const AVec<> &a)
 returns true in case when all components of a more then 0 More...
 
const AVec swapXZ (const AVec<> &a)
 returns true in case when all components of a more then 0 More...
 

Detailed Description

template<typename T = double>
class asl::AVec< T >

class algebraic vector. The class is an implementation of a dynamic array with defined algebraic operations

Examples
acousticWaves.cc, bus_wind.cc, compressor.cc, cubeGravity.cc, cubeIncompressibleGravity.cc, cubePoroelasticGravity.cc, flow.cc, flow2.cc, flow3.cc, flowKDPGrowth.cc, flowRotatingCylinders.cc, jumpingBox.cc, levelSetBasic.cc, levelSetFacetedGrowth.cc, levelSetNormalGrowth.cc, locomotive.cc, locomotive_laminar.cc, locomotive_stability.cc, multicomponent_flow.cc, multiphase_flow.cc, pitot_tube_ice.cc, poroelastic.cc, surfaceFlux.cc, testABDFormat.cc, testDistanceFunction.cc, testSMDiff.cc, testSMDiff3C.cc, testSMPhi.cc, and testSMPhiBV.cc.

Definition at line 34 of file aslDataInc.h.

Member Typedef Documentation

◆ Type

template<typename T = double>
typedef T asl::AVec< T >::Type

Definition at line 46 of file aslVectorsDynamicLength.h.

Constructor & Destructor Documentation

◆ AVec() [1/5]

template<typename T >
asl::AVec< T >::AVec ( )
inline

Definition at line 84 of file aslVectorsDynamicLength.h.

◆ AVec() [2/5]

template<typename T >
asl::AVec< T >::AVec ( unsigned int  s)
inlineexplicit

Definition at line 91 of file aslVectorsDynamicLength.h.

◆ AVec() [3/5]

template<typename T>
asl::AVec< T >::AVec ( unsigned int  s,
a 
)
inline

Definition at line 99 of file aslVectorsDynamicLength.h.

◆ ~AVec()

template<typename T >
asl::AVec< T >::~AVec ( )
inline

Definition at line 108 of file aslVectorsDynamicLength.h.

◆ AVec() [4/5]

template<typename T >
template<typename Tv >
asl::AVec< T >::AVec ( const AVec< Tv > &  a)
inlineexplicit

Definition at line 113 of file aslVectorsDynamicLength.h.

◆ AVec() [5/5]

template<typename T>
asl::AVec< T >::AVec ( const AVec< T > &  a)
inline

Definition at line 121 of file aslVectorsDynamicLength.h.

Member Function Documentation

◆ getSize()

template<typename T >
const unsigned int & asl::AVec< T >::getSize ( ) const
inline

Definition at line 171 of file aslVectorsDynamicLength.h.

◆ operator=() [1/3]

template<typename T >
template<typename Tv >
const AVec< T > & asl::AVec< T >::operator= ( const AVec< Tv > &  a)
inline

Definition at line 131 of file aslVectorsDynamicLength.h.

◆ operator=() [2/3]

template<typename T >
template<typename Tv >
const AVec< T > & asl::AVec< T >::operator= ( const std::vector< Tv > &  a)
inline

Definition at line 149 of file aslVectorsDynamicLength.h.

◆ operator=() [3/3]

template<typename T>
const AVec< T > & asl::AVec< T >::operator= ( const AVec< T > &  a)
inline

Definition at line 140 of file aslVectorsDynamicLength.h.

◆ operator[]() [1/2]

template<typename T >
T & asl::AVec< T >::operator[] ( unsigned int  i)
inline

Definition at line 159 of file aslVectorsDynamicLength.h.

◆ operator[]() [2/2]

template<typename T >
const T & asl::AVec< T >::operator[] ( unsigned int  i) const
inline

Definition at line 165 of file aslVectorsDynamicLength.h.

◆ resize()

template<typename T >
void asl::AVec< T >::resize ( unsigned int  newSize)
inline

Definition at line 223 of file aslVectorsDynamicLength.h.

Friends And Related Function Documentation

◆ compatibleSizes()

template<typename T1 , typename T2 >
bool compatibleSizes ( AVec< T1 >  a,
AVec< T2 >  b 
)
related

The function checks whether the sizes are equal.

Definition at line 141 of file aslVectorsDynamicLengthOperations.h.

◆ computePolynom()

template<typename T = double>
double computePolynom ( double  x,
AVec<> &  coefs 
)
related

computes polynom for x with coefs

The polinom is \( x^{n-1}*coefs_0+x^{n-2}coefs_1+...+coefs_{n-1} \)

Definition at line 386 of file aslVectorsDynamicLengthOperations.h.

◆ crossProduct()

template<typename T >
const AVec< T > crossProduct ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 253 of file aslVectorsDynamicLengthOperations.h.

◆ divisionOfElements()

template<typename T >
const AVec< T > divisionOfElements ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

returns vector which elements are division of corresponding elements of a and b

Definition at line 333 of file aslVectorsDynamicLengthOperations.h.

◆ floor()

template<typename T = double>
const AVec< int > floor ( const AVec<> &  a)
related

returns true in case when all components of a more then 0

Definition at line 365 of file aslVectorsDynamicLengthOperations.h.

◆ l2()

template<typename T >
const T l2 ( const AVec< T > &  a)
related

Definition at line 147 of file aslVectorsDynamicLengthOperations.h.

◆ makeAVec() [1/4]

template<typename T >
AVec< T > makeAVec ( a1)
related

◆ makeAVec() [2/4]

template<typename T >
AVec< T > makeAVec ( a1,
a2 
)
related

Definition at line 181 of file aslVectorsDynamicLength.h.

◆ makeAVec() [3/4]

template<typename T >
AVec< T > makeAVec ( a1,
a2,
a3 
)
related

Definition at line 189 of file aslVectorsDynamicLength.h.

◆ makeAVec() [4/4]

template<typename T >
AVec< T > makeAVec ( a1,
a2,
a3,
a4 
)
related

Definition at line 198 of file aslVectorsDynamicLength.h.

◆ maxComponent()

template<typename T >
const T maxComponent ( const AVec< T > &  a)
related

returns maximal component

Definition at line 285 of file aslVectorsDynamicLengthOperations.h.

◆ minComponent()

template<typename T >
const T minComponent ( const AVec< T > &  a)
related

returns minimal component

Definition at line 277 of file aslVectorsDynamicLengthOperations.h.

◆ nD()

template<typename T >
const unsigned int nD ( const AVec< T >  a)
related

Definition at line 217 of file aslVectorsDynamicLength.h.

◆ nonNegative()

template<typename T >
const bool nonNegative ( const AVec< T > &  a)
related

returns true in case when all components of a more or equal 0

Definition at line 355 of file aslVectorsDynamicLengthOperations.h.

◆ normalize()

template<typename T >
const AVec normalize ( const AVec< T > &  a)
related

◆ operator!=()

template<typename T >
const bool operator!= ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 246 of file aslVectorsDynamicLengthOperations.h.

◆ operator*() [1/3]

template<typename T >
const T operator* ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 185 of file aslVectorsDynamicLengthOperations.h.

◆ operator*() [2/3]

template<typename T >
const AVec< T > operator* ( const T &  a,
const AVec< T > &  b 
)
related

Definition at line 201 of file aslVectorsDynamicLengthOperations.h.

◆ operator*() [3/3]

template<typename T >
const AVec< T > operator* ( const AVec< T > &  a,
const T &  b 
)
related

Definition at line 194 of file aslVectorsDynamicLengthOperations.h.

◆ operator*=()

template<typename T >
const AVec< T > & operator*= ( AVec< T > &  a,
const T &  b 
)
related

Definition at line 228 of file aslVectorsDynamicLengthOperations.h.

◆ operator+()

template<typename T >
const AVec< T > operator+ ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 157 of file aslVectorsDynamicLengthOperations.h.

◆ operator+=()

template<typename T >
const AVec< T > & operator+= ( AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 212 of file aslVectorsDynamicLengthOperations.h.

◆ operator-() [1/2]

template<typename T >
const AVec< T > operator- ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 167 of file aslVectorsDynamicLengthOperations.h.

◆ operator-() [2/2]

template<typename T >
const AVec< T > operator- ( const AVec< T > &  a)
related

Definition at line 177 of file aslVectorsDynamicLengthOperations.h.

◆ operator-=()

template<typename T >
const AVec< T > & operator-= ( AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 220 of file aslVectorsDynamicLengthOperations.h.

◆ operator/()

template<typename T >
const AVec< T > operator/ ( const AVec< T > &  a,
const T &  b 
)
related

Definition at line 205 of file aslVectorsDynamicLengthOperations.h.

◆ operator<<() [1/2]

template<typename T >
std::ostream & operator<< ( std::ostream &  output,
const AVec< T > &  a 
)
related

Definition at line 208 of file aslVectorsDynamicLength.h.

◆ operator<<() [2/2]

template<typename T >
std::ostream & operator<< ( std::ostream &  output,
const AVec< T > &  a 
)
related

Definition at line 208 of file aslVectorsDynamicLength.h.

◆ operator==()

template<typename T >
const bool operator== ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

Definition at line 234 of file aslVectorsDynamicLengthOperations.h.

◆ positive()

template<typename T >
const bool positive ( const AVec< T > &  a)
related

returns true in case when all components of a more or then 0

Definition at line 345 of file aslVectorsDynamicLengthOperations.h.

◆ productOfElements() [1/2]

template<typename T >
T productOfElements ( const AVec< T > &  a)
related

returns product of all components

Definition at line 314 of file aslVectorsDynamicLengthOperations.h.

◆ productOfElements() [2/2]

template<typename T >
const AVec< T > productOfElements ( const AVec< T > &  a,
const AVec< T > &  b 
)
related

returns vector which elements are product of corresponding elements of a and b

Definition at line 322 of file aslVectorsDynamicLengthOperations.h.

◆ round()

template<typename T = double>
const AVec< int > round ( const AVec<> &  a)
related

returns true in case when all components of a more then 0

Definition at line 375 of file aslVectorsDynamicLengthOperations.h.

◆ sumOfElements()

template<typename T >
T sumOfElements ( const AVec< T > &  a)
related

returns summ of all components

Definition at line 306 of file aslVectorsDynamicLengthOperations.h.

◆ swapXZ() [1/2]

template<typename T = double>
const AVec swapXZ ( const AVec<> &  a)
related

returns true in case when all components of a more then 0

◆ swapXZ() [2/2]

template<typename T = double>
const AVec swapXZ ( const AVec<> &  a)
related

returns true in case when all components of a more then 0

Definition at line 398 of file aslVectorsDynamicLengthOperations.h.


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