SMG2S
Sparse Matrix Generator with Given Spectrum
Nilpotent< S > Class Template Reference

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`.
 
computeDegree (std::vector< S > nilpvec)
 compute the degree of a nilpotent with its off-diagonal entries stored in a vector `nilpvec`. More...
 
getProbSize ()
 Get the size of nilpotent matrix. More...
 
getDegree ()
 Get the nilpotency of nilpotent matrix. More...
 
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

probSize
 size of nilpotent matrix More...
 
degree
 nilpotency of nilpotent matrix More...
 
offset
 offset of off-diagonal More...
 
std::vector< S > indOfZeros
 indices of all zeros entries on the off-diagonal. More...
 

Detailed Description

template<typename S>
class Nilpotent< S >

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.

Template Parameters
Stype of integer to describes the dimension of matrices to be generated.

Member Function Documentation

◆ getDegree()

template<typename S >
S Nilpotent< S >::getDegree ( )
inline

Get the nilpotency of nilpotent matrix.

return Nilpotent<S>::degree

◆ getIndOfZeros()

template<typename S >
std::vector<S> Nilpotent< S >::getIndOfZeros ( )
inline

Get indices of all zeros entries on the off-diagonal.

return Nilpotent<S>::indOfZeros

◆ getOffset()

template<typename S >
S Nilpotent< S >::getOffset ( )
inline

Get off-diagonal offset of nilpotent matrix.

return Nilpotent<S>::offset

return Nilpotent<S>::offset

◆ getProbSize()

template<typename S >
S Nilpotent< S >::getProbSize ( )
inline

Get the size of nilpotent matrix.

return Nilpotent<S>::probSize

Member Data Documentation

◆ degree

template<typename S >
S Nilpotent< S >::degree
private

nilpotency of nilpotent matrix

Nipotency of the determined nilpotent matrix. For a nilpotent matrix `A`, it is the minimal integer `k` which makes $A^k = 0$.

◆ indOfZeros

template<typename S >
std::vector<S> Nilpotent< S >::indOfZeros
private

indices of all zeros entries on the off-diagonal.

Indices of all zero entries on the only off-diagonal of a nilpotent matrix

◆ offset

template<typename S >
S Nilpotent< S >::offset
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`.

  • Currently, the maximum degree supported is `80`

◆ probSize

template<typename S >
S Nilpotent< S >::probSize
private

size of nilpotent matrix

size of nilpotent matrix (square matrix with number of rows = number of columns = probSize)


The documentation for this class was generated from the following file: