INMOST
A toolkit for distributed mathematical modeling
INMOST::Sparse::AnnotationService Class Reference

This class can be used to annotate the matrix. More...

#include <inmost_sparse.h>

Public Member Functions

 AnnotationService (INMOST_DATA_ENUM_TYPE start=0, INMOST_DATA_ENUM_TYPE end=0)
 Create a new annotation for local matrix. More...
 
 AnnotationService (const AnnotationService &other)
 Copy annotations for the matrix. More...
 
AnnotationServiceoperator= (AnnotationService const &other)
 Assign annotations for the matrix. More...
 
 ~AnnotationService ()
 Destroy annotations for the matrix.
 
INMOST_DATA_ENUM_TYPE GetFirstIndex () const
 Get the first row index of the distributed matrix interval.
 
INMOST_DATA_ENUM_TYPE GetLastIndex () const
 Get the last row index of the distributed matrix interval.
 
bool Empty () const
 Check whether the interval of the local matrix was specified and non-empty.
 
void SetInterval (INMOST_DATA_ENUM_TYPE beg, INMOST_DATA_ENUM_TYPE end)
 Specify interval of the local matrix. More...
 
void GetInterval (INMOST_DATA_ENUM_TYPE &start, INMOST_DATA_ENUM_TYPE &end) const
 Retrieve interval of the local matrix. More...
 
std::string & GetAnnotation (INMOST_DATA_ENUM_TYPE row)
 Retrieve the text corresponding to a certain row of the matrix. More...
 
const std::string & GetAnnotation (INMOST_DATA_ENUM_TYPE row) const
 Retrieve the text corresponding to a certain row of the matrix without right of modification. More...
 
void SetAnnotation (INMOST_DATA_ENUM_TYPE row, std::string str)
 Specify the text to a certain row of the matrix. More...
 

Detailed Description

This class can be used to annotate the matrix.

You can optionally provide a pointer to an object of this class to Sparse::Matrix::Save or Sparse::HessianMatrix::Save. Then comments would be added to mtx file next to the non-empty strings.

Definition at line 27 of file inmost_sparse.h.

Constructor & Destructor Documentation

◆ AnnotationService() [1/2]

INMOST::Sparse::AnnotationService::AnnotationService ( INMOST_DATA_ENUM_TYPE  start = 0,
INMOST_DATA_ENUM_TYPE  end = 0 
)
inline

Create a new annotation for local matrix.

Parameters
startFirst row of the matrix.
endLast row of the matrix.

Definition at line 34 of file inmost_sparse.h.

◆ AnnotationService() [2/2]

INMOST::Sparse::AnnotationService::AnnotationService ( const AnnotationService other)
inline

Copy annotations for the matrix.

Parameters
otherAnother class for annotation.

Definition at line 37 of file inmost_sparse.h.

Member Function Documentation

◆ GetAnnotation() [1/2]

std::string& INMOST::Sparse::AnnotationService::GetAnnotation ( INMOST_DATA_ENUM_TYPE  row)
inline

Retrieve the text corresponding to a certain row of the matrix.

Parameters
rowRow of the matrix.

Definition at line 59 of file inmost_sparse.h.

◆ GetAnnotation() [2/2]

const std::string& INMOST::Sparse::AnnotationService::GetAnnotation ( INMOST_DATA_ENUM_TYPE  row) const
inline

Retrieve the text corresponding to a certain row of the matrix without right of modification.

Parameters
rowRow of the matrix.

Definition at line 62 of file inmost_sparse.h.

◆ GetInterval()

void INMOST::Sparse::AnnotationService::GetInterval ( INMOST_DATA_ENUM_TYPE &  start,
INMOST_DATA_ENUM_TYPE &  end 
) const
inline

Retrieve interval of the local matrix.

Parameters
startRecord the first row of the local matrix into this variable.
endRecord the last row of the local matrix into this variable.

Definition at line 56 of file inmost_sparse.h.

◆ operator=()

AnnotationService& INMOST::Sparse::AnnotationService::operator= ( AnnotationService const &  other)
inline

Assign annotations for the matrix.

Parameters
otherAnother class for annotation.

Definition at line 40 of file inmost_sparse.h.

◆ SetAnnotation()

void INMOST::Sparse::AnnotationService::SetAnnotation ( INMOST_DATA_ENUM_TYPE  row,
std::string  str 
)
inline

Specify the text to a certain row of the matrix.

Parameters
rowRow of the matrix.
strAnnotation for the row of the matrix.

Definition at line 66 of file inmost_sparse.h.

◆ SetInterval()

void INMOST::Sparse::AnnotationService::SetInterval ( INMOST_DATA_ENUM_TYPE  beg,
INMOST_DATA_ENUM_TYPE  end 
)
inline

Specify interval of the local matrix.

Parameters
begThe first row of the local matrix.
endThe last row of the local matrix.

Definition at line 52 of file inmost_sparse.h.


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