File kernel/src/utils/SiconosAlgebra/SiconosAlgebraTools.hpp#

Go to the source code of this file

Standalone functions used with matrices and vectors.

namespace siconos
namespace algebra

Functions

bool isComparableTo(const BlockVector &v1, const BlockVector &v2)#

test if two BlockVectors have the same number of blocks with blocks of the same size when at the same position

Parameters:
  • v1 – first vector to compare with

  • v2 – second vector to compare with

bool isComparableTo(const SiconosMatrix &m1, const SiconosMatrix &m2)#

test if two matrices have the same number of blocks with blocks of the same dimension when at the same position

Parameters:
  • v1 – first matrix to compare with

  • v2 – second matrix to compare with

namespace internal#

Functions

template<typename M, typename T = typename M::value_type>
void randomize(M &m, T min = 0., T max = 100.)#

Random init of a boost ublas matrix.

template<typename T>
struct RndIntGen#

Public Functions

inline RndIntGen(T l, T h)#
inline double operator()()#

Private Members

T low = {0}#
T high = {100}#
std::random_device rd#
std::mt19937 gen = {rd()}#
std::uniform_real_distribution<T> dist = {low, high}#