Marmote Core
The project aims at realizing the prototype of a software environment dedicated to modeling with Markov chains.
Public Member Functions | List of all members
HBF Class Reference

Storage of matrix in Harwell Boeing Format. More...

#include <hbf.h>

Public Member Functions

 HBF ()
 Empty constructor. More...
 
 HBF (sparseMatrix *mat)
 
 ~HBF ()
 Destructor. More...
 
void create (const int d, const int n)
 Full constructor with input parameters. More...
 
int size () const
 Give the non-zero values number of matrix. More...
 
int order () const
 Give the dimension of matrix. More...
 
psi_type type () const
 Give the current model type. More...
 
double maxi () const
 Give the largest element (in modulo) of continuous time matrix. More...
 
bool is_empty () const
 Test if a current HBF structure exists. More...
 
double val (const int i) const
 Give the ith non-zero value of matrix. More...
 
int col (const int i) const
 Give the ith column index. More...
 
int row (const int i) const
 Give the ith row beginning index of matrix. More...
 
int valbyrow (const int i) const
 Give the non-null values number of the ith row. More...
 
int zero_or_one ()
 Test the numerotation of input model. More...
 
void update ()
 Transformation of HBF numerotation. More...
 
void read_hbf_r (const psi_name path)
 Reading of a 'row' HBF model. More...
 
void read_marca (const psi_name path)
 Reading of a MARCA model. More...
 
void read_hbf_c (const psi_name path)
 Reading of a PEPS model. More...
 
void uniformization ()
 Uniformization of a continuous time model. More...
 
void write_unif (const psi_name file)
 Writing of a unif file in HBF (classical) format. More...
 
void col2row ()
 Conversion of a column HBF model to a row HBF model. More...
 
void convert ()
 Writing of a col2row() conversion. More...
 
void scale (const double d)
 Multiplication of matrix by a double input value. More...
 
void give_a_name (const psi_name file)
 Baptise HBF storage. More...
 
psi_name name () const
 Give the current model's name. More...
 
int out_degree () const
 Give the maximum out_degree of matrix. More...
 
void transform (const int d)
 Width transformation of matrix. More...
 

Detailed Description

Storage of matrix in Harwell Boeing Format.

There exists three possibilities to import a matrix :

The state numerotation can start from zero or from one.

Constructor & Destructor Documentation

HBF::HBF ( )

Empty constructor.

HBF::~HBF ( )

Destructor.

Member Function Documentation

int HBF::col ( const int  i) const
inline

Give the ith column index.

void HBF::col2row ( )

Conversion of a column HBF model to a row HBF model.

void HBF::convert ( )

Writing of a col2row() conversion.

void HBF::create ( const int  d,
const int  n 
)

Full constructor with input parameters.

Parameters
dan integer corresponding to the dimension.
nan integer corresponding to the non-null values number.
void HBF::give_a_name ( const psi_name  file)
inline

Baptise HBF storage.

Parameters
filean input psi_name.
bool HBF::is_empty ( ) const
inline

Test if a current HBF structure exists.

Returns
true if an HBF structure is in memory, false otherwise.
double HBF::maxi ( ) const
inline

Give the largest element (in modulo) of continuous time matrix.

psi_name HBF::name ( ) const
inline

Give the current model's name.

int HBF::order ( ) const
inline

Give the dimension of matrix.

int HBF::out_degree ( ) const

Give the maximum out_degree of matrix.

void HBF::read_hbf_c ( const psi_name  path)

Reading of a PEPS model.

Parameters
pathan input psi_name path.
void HBF::read_hbf_r ( const psi_name  path)

Reading of a 'row' HBF model.

Parameters
pathan input psi_name path.
void HBF::read_marca ( const psi_name  path)

Reading of a MARCA model.

Parameters
pathan input psi_name path.
int HBF::row ( const int  i) const
inline

Give the ith row beginning index of matrix.

void HBF::scale ( const double  d)

Multiplication of matrix by a double input value.

int HBF::size ( ) const
inline

Give the non-zero values number of matrix.

void HBF::transform ( const int  d)

Width transformation of matrix.

Parameters
dan integer corresponding to the new matrix width.
psi_type HBF::type ( ) const
inline

Give the current model type.

PSI accepts discrete and continuous time model.

void HBF::uniformization ( )

Uniformization of a continuous time model.

$\pi Q=0 \Leftrightarrow \pi P=\pi$.

void HBF::update ( )

Transformation of HBF numerotation.

PSI numerotation begin from zero and so needs a modification for models started from one.

double HBF::val ( const int  i) const
inline

Give the ith non-zero value of matrix.

int HBF::valbyrow ( const int  i) const
inline

Give the non-null values number of the ith row.

void HBF::write_unif ( const psi_name  file)

Writing of a unif file in HBF (classical) format.

Parameters
filea string corresponding to the output file.
int HBF::zero_or_one ( )
inline

Test the numerotation of input model.

This method permit to the PSI user to construct his model with numerotation choice.

Returns
0 if the input model start from zero and 1 if the input model start from one.

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