CepGen 1.2.5
Central exclusive processes event generator
|
Specialisation of a \(m\times 1\) matrix. More...
#include <CepGen/Utils/Algebra.h>
Public Types | |
typedef std::pair< size_t, size_t > | Indices |
Public Member Functions | |
Vector (size_t num_coord, double def=0.) | |
Object constructor. | |
Vector (const std::initializer_list< double > &) | |
Build a vector from a {...} list of double precision floats. | |
Vector (const VectorRef &) | |
Build a vector from a GSL vector view. | |
Vector (const gsl_vector_const_view &) | |
Build a vector from a constant GSL vector view. | |
size_t | size () const |
Vector multiplicity (number of lines) | |
Vector | subset (size_t min, size_t max=0ull) const |
Extract a subset of the vector. | |
double & | operator() (size_t) |
Component access operator. | |
double | operator() (size_t) const |
Component retrieval operator. | |
double | dot (const Vector &) const |
Scalar product of two vectors. | |
Vector | cross (const Vector &) const |
Vector product of two vectors. | |
operator Vector () const | |
Implicit conversion to vector. | |
VectorRef | diagonal () |
Return the diagonal components of the matrix. | |
Vector | diagonal () const |
Return the diagonal components of the matrix. | |
size_t | numColumns () const |
Number of (vertical) columns. | |
size_t | numRows () const |
Number of (horizontal) rows. | |
bool | operator== (const Matrix &) const |
Equality operator. | |
bool | operator!= (const Matrix &oth) const |
Inequality operator. | |
Matrix | subset (size_t min_y, size_t min_x, size_t max_y=0ull, size_t max_x=0ull) const |
Extract a subset of the matrix as a new object. | |
Matrix & | operator*= (double) |
Multiplication by a scalar operator. | |
Matrix & | operator*= (const Vector &) |
Multiplication by a vector operator. | |
Matrix & | operator*= (const Matrix &) |
Multiplication by a matrix operator. | |
Matrix & | operator/= (double) |
Division by a scalar operator. | |
Matrix | operator- () const |
Unary inverse operator. | |
Matrix & | operator+= (const Matrix &) |
Addition of another matrix. | |
Matrix & | operator-= (const Matrix &) |
Subtraction of another matrix. | |
double & | operator() (size_t, size_t) |
Component access operator. | |
double | operator() (size_t, size_t) const |
Component retrieval operator. | |
Vector | operator% (const Vector &) const |
Solving operator (from LU decomposition) | |
Indices | imin () const |
Index (row, column) of the minimum matrix element. | |
Indices | imax () const |
Index (row, column) of the maximum matrix element. | |
double | min () const |
Minimum matrix element. | |
double | max () const |
Maximum matrix element. | |
bool | null () const |
Is the matrix uniformly null? | |
bool | positive () const |
Is the matrix positive-defined? | |
bool | negative () const |
Is the matrix negative-defined? | |
bool | nonNegative () const |
Is the matrix non-negative-defined? | |
Matrix & | truncate (double min=1.e-14) |
Truncate (specify minimum non-zero value) for all matrix components. | |
Matrix & | transpose () |
Transpose the matrix. | |
Matrix | transposed () const |
Return a transposition of this matrix. | |
Matrix & | invert () |
Invert the matrix. | |
Matrix | inverted () const |
Return the inverse of this matrix (LU decomposition) | |
VectorRef | column (size_t) |
Return whole column of the matrix. | |
Vector | column (size_t) const |
Return whole column of the matrix. | |
VectorRef | row (size_t) |
Return whole row of the matrix. | |
Vector | row (size_t) const |
Return whole row of the matrix. | |
Static Public Member Functions | |
static Matrix | zero (size_t num_rows, size_t num_cols=0ull) |
Build a zero'ed matrix. | |
static Matrix | uniform (size_t num_rows, size_t num_cols, double value=1.) |
Build a uniform matrix. | |
static Matrix | identity (size_t) |
Build a (square) identity matrix. | |
static Matrix | diagonal (const Vector &) |
Build a (square) diagonal matrix from its diagonal vector. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Vector &) |
Printout of vector components. | |
|
explicit |
[in] | num_coord | vector multiplicity |
[in] | def | default value for all components |
Definition at line 307 of file Algebra.cpp.
Vector | ( | const std::initializer_list< double > & | vec | ) |
Definition at line 309 of file Algebra.cpp.
Definition at line 315 of file Algebra.cpp.
Vector | ( | const gsl_vector_const_view & | vec | ) |
Definition at line 320 of file Algebra.cpp.
|
inherited |
Definition at line 225 of file Algebra.cpp.
|
inherited |
Definition at line 223 of file Algebra.cpp.
Definition at line 345 of file Algebra.cpp.
|
inherited |
Definition at line 233 of file Algebra.cpp.
|
inherited |
Definition at line 231 of file Algebra.cpp.
Definition at line 87 of file Algebra.cpp.
double dot | ( | const Vector & | oth | ) | const |
Definition at line 333 of file Algebra.cpp.
|
staticinherited |
Definition at line 81 of file Algebra.cpp.
|
inherited |
Definition at line 168 of file Algebra.cpp.
|
inherited |
Definition at line 162 of file Algebra.cpp.
|
inherited |
Definition at line 208 of file Algebra.cpp.
|
inherited |
Definition at line 221 of file Algebra.cpp.
|
inherited |
Definition at line 176 of file Algebra.cpp.
|
inherited |
Definition at line 174 of file Algebra.cpp.
|
inherited |
Definition at line 182 of file Algebra.cpp.
|
inherited |
Definition at line 184 of file Algebra.cpp.
|
inherited |
Definition at line 178 of file Algebra.cpp.
|
inherited |
Definition at line 94 of file Algebra.cpp.
|
inherited |
Definition at line 96 of file Algebra.cpp.
|
inherited |
Definition at line 59 of file Algebra.cpp.
Definition at line 136 of file Algebra.cpp.
double & operator() | ( | size_t | i | ) |
Definition at line 329 of file Algebra.cpp.
double operator() | ( | size_t | i | ) | const |
Definition at line 331 of file Algebra.cpp.
|
inherited |
Definition at line 148 of file Algebra.cpp.
|
inherited |
Definition at line 155 of file Algebra.cpp.
Definition at line 117 of file Algebra.cpp.
Definition at line 112 of file Algebra.cpp.
|
inherited |
Definition at line 107 of file Algebra.cpp.
Definition at line 126 of file Algebra.cpp.
|
inherited |
Definition at line 124 of file Algebra.cpp.
Definition at line 131 of file Algebra.cpp.
|
inherited |
Definition at line 122 of file Algebra.cpp.
|
inherited |
Definition at line 105 of file Algebra.cpp.
|
inherited |
Definition at line 180 of file Algebra.cpp.
|
inherited |
Definition at line 229 of file Algebra.cpp.
|
inherited |
Definition at line 227 of file Algebra.cpp.
size_t size | ( | ) | const |
Definition at line 325 of file Algebra.cpp.
Vector subset | ( | size_t | min, |
size_t | max = 0ull |
||
) | const |
[in] | min | first index for the subset |
[in] | max | last index for the subset (last element if not specified) |
Definition at line 327 of file Algebra.cpp.
|
inherited |
[in] | min_y | first vertical index for the subset |
[in] | min_x | first horizontal index for the subset |
[in] | max_y | last vertical index for the subset |
[in] | max_x | last horizontal index for the subset |
Definition at line 98 of file Algebra.cpp.
|
inherited |
Definition at line 196 of file Algebra.cpp.
|
inherited |
Definition at line 206 of file Algebra.cpp.
|
inherited |
Definition at line 186 of file Algebra.cpp.
|
staticinherited |
[in] | num_rows | number of (horizontal) rows for the matrix |
[in] | num_cols | number of (vertical) columns for the matrix |
[in] | value | uniform value for all the matrix components |
Definition at line 75 of file Algebra.cpp.
|
staticinherited |
[in] | num_rows | number of (horizontal) rows for the matrix |
[in] | num_cols | number of (vertical) columns for the matrix |
Definition at line 67 of file Algebra.cpp.
|
friend |
Definition at line 357 of file Algebra.cpp.