1 #ifndef MATH_BLOCK_VECTOR_H 2 #define MATH_BLOCK_VECTOR_H 12 typedef std::vector<Vector> BaseT;
17 BlockVector(
int numBlocks,
int vecSize,Real initVal);
20 int numBlocks()
const {
return (
int)BaseT::size(); }
22 void resize(
int numBlocks);
23 void resize(
int numBlocks,
int vecSize);
24 void resize(
int numBlocks,
int vecSize,Real initVal);
27 inline void operator += (
const BlockVector& a) { inc(a); }
28 inline void operator -= (
const BlockVector& a) { dec(a); }
29 inline void operator *= (Real c) { inplaceMul(c); }
30 inline void operator /= (Real c) { inplaceDiv(c); }
47 void inplaceNegative();
48 void inplaceMul(Real c);
49 void inplaceDiv(Real c);
52 Real normSquared()
const;
53 inline Real norm()
const {
return Sqrt(normSquared()); }
56 bool hasDims(
int numBlocks,
int vecSize)
const;
Definition: BlockVector.h:9
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12