A class which determines the information of a nilpotent matrix. More...
#include <nilpotent.hpp>
Public Member Functions | |
Nilpotent (S nbOne, S size) | |
A constructor of class `Nilpotent`. More... | |
Nilpotent (S nbOne, S diag, S size) | |
A constructor of class `Nilpotent`. More... | |
Nilpotent (std::vector< S > nilpvec, S size) | |
A constructor of class `Nilpotent`. More... | |
Nilpotent (std::vector< S > nilpvec, S diag, S size) | |
A constructor of class `Nilpotent`. More... | |
~Nilpotent () | |
A destructor of class `Nilpotent`. | |
S | computeDegree (std::vector< S > nilpvec) |
compute the degree of a nilpotent with its off-diagonal entries stored in a vector `nilpvec`. More... | |
S | getProbSize () |
Get the size of nilpotent matrix. More... | |
S | getDegree () |
Get the nilpotency of nilpotent matrix. More... | |
S | getOffset () |
Get off-diagonal offset of nilpotent matrix. More... | |
std::vector< S > | getIndOfZeros () |
Get indices of all zeros entries on the off-diagonal. More... | |
void | show () |
Display the information of a nilpotent matrix. More... | |
Private Attributes | |
S | probSize |
size of nilpotent matrix More... | |
S | degree |
nilpotency of nilpotent matrix More... | |
S | offset |
offset of off-diagonal More... | |
std::vector< S > | indOfZeros |
indices of all zeros entries on the off-diagonal. More... | |
A class which determines the information of a nilpotent matrix.
This class determines a special subset of nilpotent matrix, in which only one single off-diagonal on the upper-triangular part of a square matrix has non-zeros entries. These non-zeros entries are fixed to be `1`.
This types of nilpotent matrix is determined by the four variables: Nilpotent<S>::probSize, Nilpotent<S>::degree, Nilpotent<S>::offset and Nilpotent<S>::indOfZeros.
S | type of integer to describes the dimension of matrices to be generated. |
|
inline |
Get the nilpotency of nilpotent matrix.
return Nilpotent<S>::degree
|
inline |
Get indices of all zeros entries on the off-diagonal.
return Nilpotent<S>::indOfZeros
|
inline |
Get off-diagonal offset of nilpotent matrix.
return Nilpotent<S>::offset
return Nilpotent<S>::offset
|
inline |
Get the size of nilpotent matrix.
return Nilpotent<S>::probSize
|
private |
nilpotency of nilpotent matrix
Nipotency of the determined nilpotent matrix. For a nilpotent matrix `A`, it is the minimal integer `k` which makes .
|
private |
indices of all zeros entries on the off-diagonal.
Indices of all zero entries on the only off-diagonal of a nilpotent matrix
|
private |
offset of off-diagonal
Offset of the the off-diagonal on the upper-triangular part of nilpotent matrix. It is `0`-indexed, which means that the offset of main diagonal is `0`.
|
private |
size of nilpotent matrix
size of nilpotent matrix (square matrix with number of rows = number of columns = probSize)