NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
AMatrix_base Class Reference

Search Toolkit Book for AMatrix_base

#include <algo/structure/cd_utils/cuMatrix.hpp>

+ Inheritance diagram for AMatrix_base:

Public Member Functions

 AMatrix_base ()
 
 AMatrix_base (const int NumRows, const int NumCols)
 
 AMatrix_base (const AMatrix_base &Matrix)
 
AMatrix_baseoperator= (const AMatrix_base &Matrix)
 
 ~AMatrix_base ()
 
void GetSize (int &NumRows, int &NumCols)
 
int GetNumRows () const
 
int GetNumCols () const
 
double FastGet (const int RowIndex, const int ColIndex) const
 
bool IsColSet (int ColIndex) const
 
bool Shrink (const int NumRows, const int NumCols)
 
void ReSize (const int NumRows, const int NumCols)
 
double & operator[] (int ColIndex)
 
double Get (int RowIndex, int ColIndex)
 
void Set (int RowIndex, int ColIndex, double Val)
 
void LinearTransform (double b, double m, bool ignoreDiagonal=false)
 
void GetExtremalEntries (double &max, double &min, bool ignoreDiagonal=false)
 
void DeAllocate ()
 

Protected Member Functions

int Max (int Val1, int Val2)
 

Protected Attributes

double ** m_Array
 
boolm_ColumnFlags
 
int m_NumRows
 
int m_NumCols
 
int m_RowIndex
 

Private Member Functions

void Allocate (const int NumRows, const int NumCols)
 
void Copy (const AMatrix_base &Matrix)
 
void SlowCopy (const AMatrix_base &Matrix)
 
void MakeArrayBigger (const int RowIndex, const int ColIndex)
 
bool MakeSureArrayIsBigEnough (const int RowIndex, const int ColIndex)
 

Detailed Description

Definition at line 44 of file cuMatrix.hpp.

Constructor & Destructor Documentation

◆ AMatrix_base() [1/3]

AMatrix_base::AMatrix_base ( )
inline

Definition at line 53 of file cuMatrix.hpp.

◆ AMatrix_base() [2/3]

AMatrix_base::AMatrix_base ( const int  NumRows,
const int  NumCols 
)
inline

Definition at line 60 of file cuMatrix.hpp.

References assert.

◆ AMatrix_base() [3/3]

AMatrix_base::AMatrix_base ( const AMatrix_base Matrix)
inline

Definition at line 66 of file cuMatrix.hpp.

◆ ~AMatrix_base()

AMatrix_base::~AMatrix_base ( )
inline

Definition at line 75 of file cuMatrix.hpp.

Member Function Documentation

◆ Allocate()

void AMatrix_base::Allocate ( const int  NumRows,
const int  NumCols 
)
private

Definition at line 107 of file cuMatrix.cpp.

References i, m_Array, m_ColumnFlags, m_NumCols, and m_NumRows.

Referenced by Copy(), and Shrink().

◆ Copy()

void AMatrix_base::Copy ( const AMatrix_base Matrix)
private

Definition at line 156 of file cuMatrix.cpp.

References Allocate(), DeAllocate(), m_Array, m_ColumnFlags, m_NumCols, and m_NumRows.

◆ DeAllocate()

void AMatrix_base::DeAllocate ( )

Definition at line 130 of file cuMatrix.cpp.

References i, m_Array, m_ColumnFlags, m_NumCols, m_NumRows, and NULL.

Referenced by Copy(), and Shrink().

◆ FastGet()

double AMatrix_base::FastGet ( const int  RowIndex,
const int  ColIndex 
) const
inline

Definition at line 88 of file cuMatrix.hpp.

Referenced by NJ_TreeAlgorithm::ComputeTree(), and SLC_TreeAlgorithm::ComputeTree().

◆ Get()

double AMatrix_base::Get ( int  RowIndex,
int  ColIndex 
)
inline

Definition at line 116 of file cuMatrix.hpp.

References assert.

◆ GetExtremalEntries()

void AMatrix_base::GetExtremalEntries ( double &  max,
double &  min,
bool  ignoreDiagonal = false 
)

◆ GetNumCols()

int AMatrix_base::GetNumCols ( ) const
inline

◆ GetNumRows()

int AMatrix_base::GetNumRows ( ) const
inline

◆ GetSize()

void AMatrix_base::GetSize ( int NumRows,
int NumCols 
)
inline

Definition at line 79 of file cuMatrix.hpp.

◆ IsColSet()

bool AMatrix_base::IsColSet ( int  ColIndex) const
inline

Definition at line 92 of file cuMatrix.hpp.

◆ LinearTransform()

void AMatrix_base::LinearTransform ( double  b,
double  m,
bool  ignoreDiagonal = false 
)

Definition at line 192 of file cuMatrix.cpp.

References b, GetNumRows(), i, m_Array, and n.

Referenced by DM_BlastScore::CalcPairwiseScoresOnTheFly().

◆ MakeArrayBigger()

void AMatrix_base::MakeArrayBigger ( const int  RowIndex,
const int  ColIndex 
)
private

Definition at line 42 of file cuMatrix.cpp.

References m_Array, m_ColumnFlags, m_NumCols, m_NumRows, NULL, and SlowCopy().

◆ MakeSureArrayIsBigEnough()

bool AMatrix_base::MakeSureArrayIsBigEnough ( const int  RowIndex,
const int  ColIndex 
)
inlineprivate

Definition at line 142 of file cuMatrix.hpp.

◆ Max()

int AMatrix_base::Max ( int  Val1,
int  Val2 
)
inlineprotected

◆ operator=()

AMatrix_base& AMatrix_base::operator= ( const AMatrix_base Matrix)
inline

Definition at line 70 of file cuMatrix.hpp.

◆ operator[]()

double& AMatrix_base::operator[] ( int  ColIndex)
inline

Definition at line 109 of file cuMatrix.hpp.

References assert.

◆ ReSize()

void AMatrix_base::ReSize ( const int  NumRows,
const int  NumCols 
)
inline

Definition at line 103 of file cuMatrix.hpp.

Referenced by DistanceMatrix::readMat(), and DistanceMatrix::SetData().

◆ Set()

void AMatrix_base::Set ( int  RowIndex,
int  ColIndex,
double  Val 
)
inline

Definition at line 122 of file cuMatrix.hpp.

References assert.

◆ Shrink()

bool AMatrix_base::Shrink ( const int  NumRows,
const int  NumCols 
)

Definition at line 74 of file cuMatrix.cpp.

References Allocate(), DeAllocate(), i, m_Array, m_ColumnFlags, m_NumCols, m_NumRows, and result.

◆ SlowCopy()

void AMatrix_base::SlowCopy ( const AMatrix_base Matrix)
private

Definition at line 167 of file cuMatrix.cpp.

References assert, i, m_Array, m_ColumnFlags, m_NumCols, and m_NumRows.

Referenced by MakeArrayBigger().

Member Data Documentation

◆ m_Array

double** AMatrix_base::m_Array
protected

◆ m_ColumnFlags

bool* AMatrix_base::m_ColumnFlags
protected

Definition at line 48 of file cuMatrix.hpp.

Referenced by Allocate(), Copy(), DeAllocate(), MakeArrayBigger(), Shrink(), and SlowCopy().

◆ m_NumCols

int AMatrix_base::m_NumCols
protected

Definition at line 49 of file cuMatrix.hpp.

Referenced by Allocate(), Copy(), DeAllocate(), MakeArrayBigger(), Shrink(), and SlowCopy().

◆ m_NumRows

int AMatrix_base::m_NumRows
protected

◆ m_RowIndex

int AMatrix_base::m_RowIndex
protected

Definition at line 50 of file cuMatrix.hpp.

Referenced by AMatrix::operator[]().


The documentation for this class was generated from the following files:
Modified on Fri Apr 12 17:19:53 2024 by modify_doxy.py rev. 669887