File kernel/src/utils/SiconosAlgebra/SiconosAlgebraProd.hpp

Go to the source code of this file

Functions

void axpy_prod(const SiconosMatrix&, const SiconosMatrix&, SiconosMatrix&, bool)

axpy_prod(A, B, C) computes C = A*B in an optimal way (if init = true, else +=).

Parameters
  • A: a SiconosMatrix

  • B: a SiconosMatrix

  • [inout] C: a SiconosMatrix

  • init: a bool (default = true)

void prod(const SiconosMatrix &A, const SiconosVector &x, SiconosVector &y, bool init = true)

prod(A, x, y, init) computes y = A*x or y += A*x if init = false

Parameters

void prod(const SiconosMatrix &A, const BlockVector &x, SiconosVector &y, bool init = true)
void prod(const SiconosMatrix &A, const SiconosVector &x, BlockVector &y, bool init = true)

prod(A, x, y, init) computes y = A*x or y += A*x if init = false

Parameters

void prod(const SiconosVector &x, const SiconosMatrix &A, SiconosVector &y, bool init = true)

prod(x, A, y) computes y = trans(A)*x (init = true) or y += trans(A)*x (init = false)

Parameters

void prod(const SiconosVector &x, const SiconosMatrix &A, BlockVector &y, bool init = true)
SiconosVector prod(const SiconosMatrix &A, const SiconosVector &x)

prod(A, x) returns the product Ax

Return

a SiconosVector

Parameters

void prod(const SiconosMatrix &A, const SiconosMatrix &B, SiconosMatrix &C, bool init = true)

prod(A, B, C) computes C = A*B in an optimal way, or C += AB if init = false.

Parameters
  • A: a SiconosMatrix

  • B: a SiconosMatrix

  • [inout] C: a SiconosMatrix

  • init: a bool (default = true)

void prod(double a, const SiconosMatrix &A, const SiconosVector &x, SiconosVector &y, bool init = true)

prod(a, A, x, y, init) computes y = a*A*x or y += a*A*x if init = false

Parameters

void subprod(const SiconosMatrix &A, const SiconosVector &x, SiconosVector &y, const Index &coord, bool init = true)

subprod(A, x, y) computes sub_y = sub_A*sub_x or sub_y += sub_A*sub_x if init = false

Parameters
  • A: a SiconosMatrix

  • x: a SiconosVector

  • [inout] y: a SiconosVector

  • coord: an Index = [r0A r1A c0A c1A r0x r1x r0y r1y]; subA is the sub-matrix of A, for row numbers between r0A and r1A-1 and columns between c0A and c1A-1; The same for x and y with rix and riy.

  • init: a bool (default = true)

void subprod(const SiconosMatrix &A, const BlockVector &x, SiconosVector &y, const Index &coord, bool init = true)
void taxpy(SPC::SiconosVector x, SPC::SiconosMatrix A, unsigned int startRow, unsigned int startCol, SP::SiconosVector y, bool init = true)

computes y += sub(transpose(A)) x (only = if init = true) where subA is a sub-matrix of A.

Parameters
  • A: a SiconosMatrix

  • x: a SiconosVector

  • [inout] y: a SiconosVector

  • startRow: row index of the first element considered in tA (to get sub(tA))

  • startCol: col index of the first element considered in tA (to get sub(tA))

  • init: if true, start with y = 0, else add subA.x to current y.