StaticMatrix¶
This page contains information about the constructors for the
StaticMatrix()
class.
Default constructors¶
-
StaticMatrix() = default¶
Default constructor.
-
StaticMatrix(StaticMatrix const&) = default¶
Default copy constructor.
-
StaticMatrix(StaticMatrix&&) = default¶
Default move constructor.
-
StaticMatrix &operator=(StaticMatrix const&) = default¶
Default copy assignment operator.
-
StaticMatrix &operator=(StaticMatrix&&) = default¶
Default move assignment operator.
Matrix constructors¶
-
StaticMatrix(std::initializer_list<std::initializer_list<scalar_type>> m)¶
Construct a matrix.
- Parameters
m – the values to be copied into the matrix.
- Exceptions
this function guarantees not to throw a
LibsemigroupsException
.- Complexity
\(O(mn)\) where \(m\) is the template parameter
R
and \(n\) is the template parameterC
.
Example
Mat m({{1, 1}, {0, 0}});
-
StaticMatrix(std::vector<std::vector<scalar_type>> const &m)¶
Construct a matrix.
- Parameters
m – the values to be copied into the matrix.
- Exceptions
this function guarantees not to throw a
LibsemigroupsException
.- Complexity
\(O(mn)\) where \(m\) is the template parameter
R
and \(n\) is the template parameterC
.
Row constructors¶
-
StaticMatrix(std::initializer_list<scalar_type> c)¶
Construct a row.
- Parameters
c – the values to be copied into the row.
- Exceptions
this function guarantees not to throw a
LibsemigroupsException
.- Complexity
\(O(n)\) where \(n\) is the size of the row being constructed.
Warning
This constructor only works for rows, i.e. when the template parameter
R
is1
.
-
StaticMatrix(RowView const &rv)¶
Construct a row from a row view.
- Parameters
rv – the row view.
- Exceptions
this function guarantees not to throw a
LibsemigroupsException
.- Complexity
\(O(n)\) where \(n\) is the size of the row being constructed.
Warning
This constructor only works for rows, i.e. when the template parameter
R
is1
.