Bonmin  1.8.8
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Bonmin::TMat Struct Reference

#include <BonTMatrix.hpp>

Classes

struct  ColumnOrder
 Structure for ordering matrix by columns. More...
 
struct  RowOrder
 Structure for ordering matrix by columns. More...
 
struct  TMatOrdering
 Structure for ordering matrix. More...
 

Public Types

typedef vector< std::pair< int,
int > > 
RowS
 Storage for non empty rows. More...
 

Public Member Functions

 TMat ()
 Default constructor. More...
 
void freeSpace ()
 
 TMat (const TMat &other)
 Copy constructor. More...
 
 TMat (const CoinPackedMatrix &M, MatrixStorageType T)
 Construct from a CoinPackedMatrix. More...
 
TMat & operator= (const TMat &rhs)
 Assignment operator. More...
 
TMat & operator= (const CoinPackedMatrix &M)
 Assignment from a CoinPackedMatrix. More...
 
void resize (int nnz)
 
 ~TMat ()
 
int numNonEmptyRows ()
 Get number of non empty rows. More...
 
const RowS & nonEmptyRows () const
 Get the list of non empty row. More...
 
int numNonEmptyCols ()
 Get number of non empty cols. More...
 
const RowS & nonEmptyCols () const
 Get the list of non empty row. More...
 
const vector< int > & orderByColumns ()
 Orders current matrix by columns. More...
 
const vector< int > & orderByRows ()
 Orders current matrix by rows. More...
 
void removeDuplicates ()
 Remove the duplicated entries. More...
 
void makeQuadUpperDiag ()
 Assuming that this is representing a quadratic form. More...
 
void resizeOrdering (vector< int > &ordering, unsigned int newSize)
 
void create (const CoinPackedMatrix &M)
 Create the TMat from M. More...
 
void make_upper_triangular (const MatrixStorageType &T)
 
void make_lower_to_be_upper ()
 
void make_full_upper_triangular ()
 

Public Attributes

int * iRow_
 
int * jCol_
 
double * value_
 
int nnz_
 
int capacity_
 
vector< int > columnOrdering_
 
vector< int > rowOrdering_
 
RowS nonEmptyRows_
 
RowS nonEmptyCols_
 

Detailed Description

Definition at line 22 of file BonTMatrix.hpp.

Member Typedef Documentation

typedef vector< std::pair< int, int> > Bonmin::TMat::RowS

Storage for non empty rows.

first is row number and second is first element in row.

Definition at line 32 of file BonTMatrix.hpp.

Constructor & Destructor Documentation

Bonmin::TMat::TMat ( )
inline

Default constructor.

Definition at line 35 of file BonTMatrix.hpp.

Bonmin::TMat::TMat ( const TMat &  other)

Copy constructor.

Bonmin::TMat::TMat ( const CoinPackedMatrix &  M,
MatrixStorageType  T 
)

Construct from a CoinPackedMatrix.

Bonmin::TMat::~TMat ( )

Member Function Documentation

void Bonmin::TMat::freeSpace ( )
inline

Definition at line 40 of file BonTMatrix.hpp.

References iRow_, jCol_, and value_.

TMat& Bonmin::TMat::operator= ( const TMat &  rhs)

Assignment operator.

TMat& Bonmin::TMat::operator= ( const CoinPackedMatrix &  M)

Assignment from a CoinPackedMatrix.

void Bonmin::TMat::resize ( int  nnz)
inline

Definition at line 58 of file BonTMatrix.hpp.

References iRow_, jCol_, nnz_, Bonmin::resizeAndCopyArray(), and value_.

int Bonmin::TMat::numNonEmptyRows ( )

Get number of non empty rows.

const RowS& Bonmin::TMat::nonEmptyRows ( ) const
inline

Get the list of non empty row.

Definition at line 71 of file BonTMatrix.hpp.

References nonEmptyRows_.

int Bonmin::TMat::numNonEmptyCols ( )

Get number of non empty cols.

const RowS& Bonmin::TMat::nonEmptyCols ( ) const
inline

Get the list of non empty row.

Definition at line 78 of file BonTMatrix.hpp.

References nonEmptyCols_.

const vector<int>& Bonmin::TMat::orderByColumns ( )
inline

Orders current matrix by columns.

Definition at line 118 of file BonTMatrix.hpp.

References columnOrdering_, nnz_, and resizeOrdering().

const vector<int>& Bonmin::TMat::orderByRows ( )
inline

Orders current matrix by rows.

Definition at line 124 of file BonTMatrix.hpp.

References nnz_, resizeOrdering(), and rowOrdering_.

void Bonmin::TMat::removeDuplicates ( )

Remove the duplicated entries.

void Bonmin::TMat::makeQuadUpperDiag ( )

Assuming that this is representing a quadratic form.

Produce equivalent quadratic form with only upper triange stored.

void Bonmin::TMat::resizeOrdering ( vector< int > &  ordering,
unsigned int  newSize 
)
inline

Definition at line 137 of file BonTMatrix.hpp.

Referenced by orderByColumns(), and orderByRows().

void Bonmin::TMat::create ( const CoinPackedMatrix &  M)

Create the TMat from M.

void Bonmin::TMat::make_upper_triangular ( const MatrixStorageType &  T)
void Bonmin::TMat::make_lower_to_be_upper ( )
void Bonmin::TMat::make_full_upper_triangular ( )

Member Data Documentation

int* Bonmin::TMat::iRow_
int* Bonmin::TMat::jCol_
double* Bonmin::TMat::value_

Definition at line 25 of file BonTMatrix.hpp.

Referenced by freeSpace(), and resize().

int Bonmin::TMat::nnz_
int Bonmin::TMat::capacity_

Definition at line 27 of file BonTMatrix.hpp.

vector<int> Bonmin::TMat::columnOrdering_

Definition at line 147 of file BonTMatrix.hpp.

Referenced by orderByColumns().

vector<int> Bonmin::TMat::rowOrdering_

Definition at line 149 of file BonTMatrix.hpp.

Referenced by orderByRows().

RowS Bonmin::TMat::nonEmptyRows_

Definition at line 158 of file BonTMatrix.hpp.

Referenced by nonEmptyRows().

RowS Bonmin::TMat::nonEmptyCols_

Definition at line 161 of file BonTMatrix.hpp.

Referenced by nonEmptyCols().


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