# File kernel/src/utils/SiconosAlgebra/SimpleMatrixFriends.hpp¶

Go to the source code of this file

List of friend functions for SimpleMatrix.

Functions

void add(const SiconosMatrix &A, const SiconosMatrix &B, SiconosMatrix &C)

Addition of two matrices C = A+B.

Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

• [inout] C: a SiconosMatrix

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

Compares two (block) matrices: true if they have the same number of blocks and if blocks which are facing each other have the same size; always true if one of the two is a SimpleMatrix.

Parameters
• m1: a SiconosMatrix

• m2: a SiconosMatrix

bool operator!=(const SiconosMatrix &A, const SiconosMatrix &B)

: A!=B when (A-B).normInf()>tolerance

Return

a boolean

Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

SimpleMatrix operator*(double a, const SiconosMatrix &A)

multiplication of a matrix by a double

Return

a SimpleMatrixmultiplication of a matrix by a double

Return
Parameters
• A: a SiconosMatrix

• a: a double

Parameters
• a: a double

• A: a SiconosMatrix

const SimpleMatrix operator+(const SiconosMatrix &A, const SiconosMatrix &B)

multiplication of a SimpleMatrix by a SimpleMatrix

Return

a const SimpleMatrixmultiplication of a SP::SimpleMatrix by a SP::SimpleMatrix

Return

a SP::SimpleMatrixoperator += add B to A

Return

a SimpleMatrix Addition of two matrices, C = A+B

Return
Parameters
• a: const SiconosMatrix&

• a: const SimpleMatrix&

Parameters
• A: a SP::SiconosMatrix

• B: a SP::SimpleMatrix

Parameters
• [inout] A: a SP::SiconosMatrix

• B: a SP::SiconosMatrixdivision of the matrix by a double

• A: a SiconosMatrix

• a: a double

Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

SP::SimpleMatrix operator+(const SP::SimpleMatrix A, const SP::SimpleMatrix B)

Addition of two matrices, C = A+B.

Return

a SP::SimpleMatrix

Parameters
• A: a SP::SiconosMatrix

• B: a SP::SiconosMatrix

SimpleMatrix operator+(const SimpleMatrix &A, const SimpleMatrix &B)
const SimpleMatrix operator-(const SiconosMatrix &A, const SiconosMatrix &B)

Subtraction of two matrices, C = A-B.

Return
Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

bool operator==(const SiconosMatrix &A, const SiconosMatrix &B)

: A==B when (A-B).normInf()<tolerance

Return

a boolean

Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

void sub(const SiconosMatrix &A, const SiconosMatrix &B, SiconosMatrix &C)

Subtraction of two matrices C = A-B.

Parameters
• A: a SiconosMatrix

• B: a SiconosMatrix

• [inout] C: a SiconosMatrix