AbstractLinAlgPack Namespace Reference


Classes

class  AbstractLinAlgPack::BasisSystem
 Interface for the creation and maintainance of a basis matrix for a decomposition of linearlized constriants. More...
class  AbstractLinAlgPack::BasisSystem::SingularBasis
  More...
class  AbstractLinAlgPack::BasisSystemFactory
 Interface for a factory object that will create BasisSystem objects. More...
class  AbstractLinAlgPack::BasisSystemPerm
 Interface for setting and selecting a basis from the Jacobian from a set of equations. More...
struct  AbstractLinAlgPack::compare_element_indexes_less< T_Element >
 ele1.index() < ele2.index() More...
struct  AbstractLinAlgPack::compare_element_indexes_equal_to< T_Element >
 ele.index() == i More...
class  AbstractLinAlgPack::EtaVector
 Create an eta vector (scaled by alpha = default 1). More...
class  AbstractLinAlgPack::GenPermMatrixSlice
 Concrete matrix type to represent general permutation (mapping) matrices. More...
class  AbstractLinAlgPack::InnerProduct
 Abstract interface for inner products. More...
class  AbstractLinAlgPack::InnerProductDot
 Implements the inner product as the dot product. More...
class  AbstractLinAlgPack::MatrixBase
 Base class for all polymorphic matrices. More...
class  AbstractLinAlgPack::MatrixBase::IncompatibleMatrices
 Thrown if matrices are incompatible. More...
class  AbstractLinAlgPack::MatrixNonsing
 Abstract base class for all nonsingular polymorphic matrices that can solve for linear system with but it may not be convienent to compute matrix vector products {abstract}. More...
class  AbstractLinAlgPack::MatrixNonsing::SingularMatrix
 This exception will be thrown if it turns out at runtime that the matrix is numerically singular. More...
class  AbstractLinAlgPack::MatrixOp
 Base class for all matrices that support basic matrix operations. More...
struct  AbstractLinAlgPack::MatrixOp::MatNorm
 Returned form calc_norm(). More...
class  AbstractLinAlgPack::MatrixOp::MethodNotImplemented
 Thrown if a method is not implemented. More...
class  AbstractLinAlgPack::MatrixOp::IncompatibleMatrices
 Thrown if matrices are not compatible. More...
class  AbstractLinAlgPack::MatrixOpNonsing
 Abstract base class for all nonsingular polymorphic matrices that can be used to compute matrix-vector products and solve for linear systems efficiently. More...
class  AbstractLinAlgPack::MatrixOpNonsingAggr
 Aggregate matrix class pulling together a MatrixOp object and a MatrixNonsing object into a unified matrix object. More...
class  AbstractLinAlgPack::MatrixOpSubView
 Standard subclass for representing a sub, possibly transposed, view of a matrix. More...
class  AbstractLinAlgPack::MatrixPermAggr
 Aggregate matrix class for a matrix and its permuted view. More...
class  AbstractLinAlgPack::MatrixSymDiag
 Interface to all diagonal matrices {abstract}. More...
class  AbstractLinAlgPack::MatrixSymInitDiag
 Mix-in Interface for setting a matrix to a diagonal {abstract}. More...
class  AbstractLinAlgPack::MatrixSymNonsing
 Abstract base class for all polymorphic symmetrix nonsingular matrices that can be used to solve for linear systems relatively efficently. More...
class  AbstractLinAlgPack::MatrixSymOp
 Interface adding operations specific for a symmetric matrix {abstract}. More...
class  AbstractLinAlgPack::MatrixSymOpNonsing
 Abstract base class for all polymorphic symmetrix nonsingular matrices that can be used to compute matrix-vector products and solve for linear systems relatively efficently. More...
class  AbstractLinAlgPack::MatrixSymSecant
 Mix-in interface for all polymorphic symmetric matrices that support secant updating. More...
class  AbstractLinAlgPack::MatrixSymSecant::UpdateSkippedException
  More...
class  AbstractLinAlgPack::MatrixSymSecant::UpdateFailedException
  More...
class  AbstractLinAlgPack::MultiVector
 Interface for a collection of non-mutable vectors (multi-vector, matrix). More...
class  AbstractLinAlgPack::MultiVectorMutable
 Interface for a collection of mutable vectors (multi-vector, matrix). More...
class  AbstractLinAlgPack::Permutation
 Abstract interface to permutation matrices. More...
class  AbstractLinAlgPack::SparseElement< T_Index, T_Value >
 Sparse storage element type. More...
union  AbstractLinAlgPack::SparseElement< T_Index, T_Value >::index_and_padding
class  AbstractLinAlgPack::SparseVector< T_Element, T_Alloc >
 Sparse Vector class template. More...
class  AbstractLinAlgPack::SparseVectorSlice< T_Element >
 Sparse Vector Slice class template. More...
class  AbstractLinAlgPack::Vector
 Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}. More...
class  AbstractLinAlgPack::VectorApplyOpSerialBase
 This is a base class that is meant to be inherited by Vector subclasses that wish to call TSFCore::apply_op_serial() when vectors are in core. More...
class  AbstractLinAlgPack::VectorMutable
 Abstract interface for mutable coordinate vectors {abstract}. More...
class  AbstractLinAlgPack::VectorMutableSubView
 Concrete subclass for a sub-view of a VectorMutable object. More...
class  AbstractLinAlgPack::VectorSpace
 Abstract interface for objects that represent a space for mutable coordinate vectors. More...
class  AbstractLinAlgPack::VectorSpace::IncompatibleVectorSpaces
 Thrown if vector spaces are incompatible. More...
class  AbstractLinAlgPack::VectorSpaceFactory
 Abstract interface for objects that can create vector spaces of a specified dimension. More...
class  AbstractLinAlgPack::VectorSpaceSubSpace
 Concrete subclass for a default sub-space of a vector. More...
class  AbstractLinAlgPack::VectorSubView
 Concrete subclass for a default sub-view implementation for a Vector object. More...
class  AbstractLinAlgPack::NaNInfException
  More...
class  AbstractLinAlgPack::BasisSystemComposite
 Simple BasisSystem subclass the case where the client sets up seperate C and N matrices. More...
class  AbstractLinAlgPack::BasisSystemTester
 Testing class for BasisSystem interface. More...
class  AbstractLinAlgPack::BasisSystemTesterSetOptions
 Set options for BasisSystemTester from an OptionsFromStream object. More...
class  AbstractLinAlgPack::MatrixComposite
 Matrix class for matrices composed out of a set of other matrices and vectors. More...
struct  AbstractLinAlgPack::MatrixComposite::SubVectorEntry
 Vector list entry for a sub-vector. More...
struct  AbstractLinAlgPack::MatrixComposite::SubMatrixEntry
 Matrix list entry for a sub-matrix. More...
class  AbstractLinAlgPack::MatrixOpNonsingTester
 Testing class for MatrixOpNonsing interface. More...
class  AbstractLinAlgPack::MatrixSymDiagStd
 Simple diagonal matrix class. More...
class  AbstractLinAlgPack::MatrixSymDiagStd::PostMod
 PostMod class to use with MemMngPack::AbstractFactorStd. More...
class  AbstractLinAlgPack::MatrixSymIdent
 Matrix subclass for a scaled identity matrix. More...
class  AbstractLinAlgPack::MatrixZero
 Implementation of a matrix with all zeros. More...
class  AbstractLinAlgPack::VectorMutableBlocked
 Concrete subclass for a blocked vector. More...
class  AbstractLinAlgPack::VectorSpaceBlocked
 VectorSpace subclass for the composite of one or more VectorSpace objects. More...
class  AbstractLinAlgPack::VectorSpaceTester
 Testing class for VectorSpace, Vector and VectorMutable. More...
class  AbstractLinAlgPack::VectorSpaceTesterSetOptions
 Set options for VectorSpaceTester from an OptionsFromStream object. More...
class  AbstractLinAlgPack::PreConditionException
 Base class for precondition exceptions. More...
class  AbstractLinAlgPack::PostConditionException
 Base class for postcondition exceptions. More...
class  AbstractLinAlgPack::InputException
 Base class for input exceptions (Preconditions). More...
class  AbstractLinAlgPack::SetupException
 Base class for invalid setup for a class object when an exception is thrown. More...
class  AbstractLinAlgPack::COOMatrix
 Sparse Coordinate Matrix abstraction storage class. More...
class  AbstractLinAlgPack::COOMatrixPartitionedView< T_Indice, T_Value >
 COO Matrix partitioning view class. More...
class  AbstractLinAlgPack::COOMatrixPartitionedView< T_Indice, T_Value >::UninitializedException
  More...
class  AbstractLinAlgPack::COOMatrixPartitionViewSubclass
 Implementation of MatrixOp abstract interface for COOMatrixWithPartitionedView::partition_type. More...
class  AbstractLinAlgPack::COOMatrixWithPartitionedView
 Aggregation of a COO matrix and a partitioned view of it. More...
class  AbstractLinAlgPack::COOMatrixWithPartitionedViewSubclass
 Implementation of MatrixOp abstract interface for COOMatrixWithPartitionedView. More...
class  AbstractLinAlgPack::MatrixBasisNonbasisStd
 This is the interface to a basis and an nonbasis matrix. More...
class  AbstractLinAlgPack::MatrixCOORTmplItfc< T_Scalar, T_Index >
 Templated class that supports the COOMatrixTemplateInterface template interface. More...
class  AbstractLinAlgPack::MatrixCOORTmplItfcItrEleView< T_Scalar, T_Index >
 Templated class for objects that support the SparseCOOElementTemplatInterface specification. More...
class  AbstractLinAlgPack::MatrixCOORTmplItfcItr< T_Scalar, T_Index >
 Templated class for iterator returning objects that support the SparseCOOElementTemplatInterface specification. More...
class  AbstractLinAlgPack::MatrixSparseCOORSerial
 Coordinate matrix subclass. More...
class  AbstractLinAlgPack::MatrixSparseCOORSerial::ReleaseValRowColArrays
 Subclass to delete dynamically allocated memory with delete[]. More...
class  AbstractLinAlgPack::MatrixSymDiagSparseStd
 Concrete subclass for a serial symmetric diagonal matrix with many zeros on the diagonal. More...
class  AbstractLinAlgPack::MatrixWithOpConcreteEncap< M >
 This template class defines the storage for a concrete matrix class that operations are based on. More...
class  AbstractLinAlgPack::SortByDescendingAbsValue
 Function object class for sorting a sparse vectors in descending order by abs(v(i)). More...
class  AbstractLinAlgPack::sparse_bounds_itr
 Iterate through a set of sparse bounds. More...
class  AbstractLinAlgPack::SparseCOOPtrElement< T_Index, T_Value >
 Sparse pointer element type for a COO matrix (val, ivect, jvect). More...
class  AbstractLinAlgPack::SparsePtrElement< T_Indice, T_Value >
 Sparse pointer element type. More...
class  AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >
 Templateded iterator for iterating through a set of COO Matix elements but viewing them in transpose. More...
class  AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::ElementView< TT_Iter, TT_IterCat, TT_Indice, TT_ValRef, TT_Diff >
 Type for the object that is returned for the transpose sparse element. More...
class  AbstractLinAlgPack::VectorDenseEncap
 Extract a constant DenseLinAlgPack::DVectorSlice view of a Vector object. More...
class  AbstractLinAlgPack::VectorDenseMutableEncap
 Extract a non-const DenseLinAlgPack::DVectorSlice view of a VectorMutable object. More...
class  AbstractLinAlgPack::ConvertToCSC
 Abstract interface for inserting a matrix into a Fortran compatable compressed column sparse matrix format. More...
class  AbstractLinAlgPack::MatrixBasisNonbasis
 This is the interface to a basis and an nonbasis matrix. More...
class  AbstractLinAlgPack::MatrixBasisNonbasis::MatrixNotAvailable
 Base class for postcondition exceptions. More...
class  AbstractLinAlgPack::MatrixConvertToSparse
 Mix-in interface for extracing explicit elements from a sparse matrix in one of several Fortran compatible formats. More...
class  AbstractLinAlgPack::MatrixConvertToSparseEncap
 Sparse conversion subclass based on views of a MatrixExtractSparseElements object. More...
class  AbstractLinAlgPack::MatrixExtractInvCholFactor
 Mix-in Interface for extracting the inverse cholesky factor of a dense symmetric positive definite matrix. More...
class  AbstractLinAlgPack::MatrixExtractSparseElements
 Interface for extracting nonzero elements from a banded subregion of a permuted sparse matrix in one of several Fortran compatible formats. More...
class  AbstractLinAlgPack::MatrixLoadSparseElements
 Mix-in interface for loading nonzero elements into a sparse matrix data structure. More...
class  AbstractLinAlgPack::MatrixNonsingSerial
 Abstract base class for all AbstractLinAlgPack::MatrixNonsing objects implemented in shared memory space. More...
class  AbstractLinAlgPack::MatrixOpGetGMS
 Abstract interface that allows the extraction of a const DMatrixSlice view of an abstract matrix. More...
class  AbstractLinAlgPack::MatrixDenseEncap
 Helper class type that simplifies the usage of the MatrixOpGetGMS interface for clients. More...
class  AbstractLinAlgPack::MatrixOpGetGMSMutable
 Abstract interface that allows the extraction of a non-const DMatrixSlice view of an abstract matrix. More...
class  AbstractLinAlgPack::MatrixDenseMutableEncap
 Helper class type that simplifies the usage of the MatrixOpGetGMSMutable interface for clients. More...
class  AbstractLinAlgPack::MatrixOpGetGMSTri
 Mix-in interface that allows the extraction of a const DenseLinAlgPack::DMatrixSliceTri view of an non-singular abstract matrix. More...
class  AbstractLinAlgPack::MatrixDenseTriEncap
 Helper class type that simplifies the usage of the MatrixOpGetGMSTri interface for clients. More...
class  AbstractLinAlgPack::MatrixOpNonsingSerial
 Abstract base class for all serial nonsingular polymorphic matrices that can be used to compute matrix-vector products and solve for linear systems efficiently. More...
class  AbstractLinAlgPack::MatrixOpSerial
 Base class for all matrices implemented in a shared memory address space. More...
class  AbstractLinAlgPack::MatrixSymAddDelUpdateable
 Mix-in Interface for updating a serial symmetric matrix by adding and deleting rows and columns. More...
struct  AbstractLinAlgPack::MatrixSymAddDelUpdateable::Inertia
 Struct for the inertia of the matrix. More...
struct  AbstractLinAlgPack::MatrixSymAddDelUpdateable::PivotTolerances
 Struct for pivot tolerances to be used when initializing, and augmenting and deleting rows and columns. More...
class  AbstractLinAlgPack::MatrixSymAddDelUpdateable::WarnNearSingularUpdateException
 Thrown if the matrix is near singular as a warning. More...
class  AbstractLinAlgPack::MatrixSymAddDelUpdateable::SingularUpdateException
 Thrown if the matrix is singular and should not have been. More...
class  AbstractLinAlgPack::MatrixSymAddDelUpdateable::WrongInertiaUpdateException
 Thrown if matrix has the wrong inertia from what was expected. More...
class  AbstractLinAlgPack::MatrixSymAddDelUpdateable::MaxSizeExceededException
 Thrown if the maximum size is exceeded in augment_update(...). More...
class  AbstractLinAlgPack::MatrixSymDenseInitialize
 Mix-in Interface for initializing a matrix with a dense symmetric matrix. More...
class  AbstractLinAlgPack::MatrixSymDiagSparse
 Abstract base class for all serial symmetric diagonal matrices with significant zeros along the diagonal. More...
class  AbstractLinAlgPack::MatrixSymNonsingSerial
 Abstract base class for all serial polymorphic symmetrix nonsingular matrices that can be used to solve for linear systems relatively efficiently. More...
class  AbstractLinAlgPack::MatrixSymOpGetGMSSym
 Abstract interface that allows the extraction of a const DenseLinAlgPack::DMatrixSliceSym view of an abstract matrix. More...
class  AbstractLinAlgPack::MatrixDenseSymEncap
 Helper class type that simplifies the usage of the MatrixSymOpGetGMSSym interface for clients. More...
class  AbstractLinAlgPack::MatrixSymOpGetGMSSymMutable
 Abstract interface that allows the extraction of a non-const DenseLinAlgPack::DMatrixSliceSym view of a symmetry abstract matrix. More...
class  AbstractLinAlgPack::MatrixDenseSymMutableEncap
 Helper class type that simplifies the usage of the MatrixSymOpGetGMSSymMutable interface for clients. More...
class  AbstractLinAlgPack::MatrixSymOpNonsingSerial
 Abstract base class for all serial polymorphic symmetric nonsingular matrices that can be used to compute matrix-vector products and solve for linear systems relatively efficiently. More...
class  AbstractLinAlgPack::MatrixSymOpSerial
 Abstract base class for all AbstractLinAlgPack::MatrixSymOp objects implemented in shared memory space. More...
class  AbstractLinAlgPack::MultiVectorMutableCols
 Default subclass for MultiVectorMutable implemented using columns of separate abstract vectors. More...
class  AbstractLinAlgPack::MultiVectorMutableDense
 MultiVectorMutable "Adapter" subclass for DenseLinAlgPack::DMatrixSlice or DenseLinAlgPack::DMatrix object. More...
class  AbstractLinAlgPack::VectorMutableDense
 DVector "Adaptor" subclass for DenseLinAlgPack::DVectorSlice or DenseLinAlgPack::DVector objects. More...
class  AbstractLinAlgPack::VectorSpaceFactorySerial
 Abstract interface for objects that can create vector spaces of a specified dimension. More...
class  AbstractLinAlgPack::VectorSpaceSerial
 Subclass for serial vector space objects that create VectorMutableDense vector and MultiVectorMutableDense multi-vector objects. More...
class  AbstractLinAlgPack::BasisSystemFactoryStd
 Default implementation for BasisSystemPermDirectSparse obejcts using DirectSparseSolver object. More...
class  AbstractLinAlgPack::BasisSystemPermDirectSparse
 Permutatble basis system subclass that uses a direct sparse solver. More...
class  AbstractLinAlgPack::DirectSparseSolver
 Abstract interface to serial direct sparse linear solvers. More...
class  AbstractLinAlgPack::DirectSparseSolver::FactorizationStructure
 Abstract class for objects that represent the factorization structure of a particular matrix. More...
class  AbstractLinAlgPack::DirectSparseSolver::BasisMatrix
 Abstract class for objects that represent the factorized matrix and can be used to solve for different right-hand-sides. More...
class  AbstractLinAlgPack::DirectSparseSolver::UnsymmetricRankDeficientException
  More...
class  AbstractLinAlgPack::DirectSparseSolver::IncompatibleMatrixStructureException
  More...
class  AbstractLinAlgPack::DirectSparseSolver::InvalidObjectType
  More...
class  AbstractLinAlgPack::DirectSparseSolver::NoCurrentBasisException
  More...
class  AbstractLinAlgPack::DirectSparseSolver::FactorizationFailure
  More...
class  AbstractLinAlgPack::DirectSparseSolverDense
 Concreate sparse solver subclass that uses the dense LAPACK routines. More...
class  AbstractLinAlgPack::DirectSparseSolverDense::BasisMatrixDense
 Implements the BasisMatrix object for Dense. More...
class  AbstractLinAlgPack::DirectSparseSolverDense::FactorizationStructureDense
 Stores the factorization structure for Dense. More...
class  AbstractLinAlgPack::DirectSparseSolverDense::FactorizationNonzerosDense
 Stores the factorization nonzeros for Dense. More...
class  AbstractLinAlgPack::DirectSparseSolverImp
 Implementation node class for DirectSparseSolver that takes care of the memory management details. More...
class  AbstractLinAlgPack::DirectSparseSolverImp::FactorizationNonzeros
 Abstract class for objects that represent the factorization nonzeros of a particular matrix. More...
class  AbstractLinAlgPack::DirectSparseSolverImp::BasisMatrixImp
 Implementation node subclass that combines factorization structure and factorization nonzeros into a single basis matrix object. More...
class  AbstractLinAlgPack::DirectSparseSolverMA28
 Concreate sparse solver subclass that uses MA28. More...
class  AbstractLinAlgPack::DirectSparseSolverMA28::BasisMatrixMA28
 Implements the BasisMatrix object for MA28. More...
class  AbstractLinAlgPack::DirectSparseSolverMA28::FactorizationStructureMA28
 Stores the factorization structure for MA28. More...
class  AbstractLinAlgPack::DirectSparseSolverMA28::FactorizationNonzerosMA28
 Stores the factorization nonzeros for MA28. More...
class  AbstractLinAlgPack::DirectSparseSolverMA28SetOptions
 Set options for DirectSparseSolverMA28 from OptionsFromStream object. More...
class  AbstractLinAlgPack::MatrixScaling_Strategy
 Abstract interface for sparse matrix scaling strategies. More...
class  AbstractLinAlgPack::InnerProductThyra
 Implements the inner product using Thyra::VectorSpaceBase::scalarProd(). More...
class  AbstractLinAlgPack::MatrixOpNonsingThyra
 MatrixOpNonsing adapter subclass for Thyra::Nonlin::LinearOpWithSolve. More...
class  AbstractLinAlgPack::MatrixOpThyra
 MatrixOp adapter subclass for Thyra::LinearOpBase. More...
class  AbstractLinAlgPack::MultiVectorMutableThyra
 MultiVectorMutable adapter subclass for Thyra::MultiVectorBase. More...
class  AbstractLinAlgPack::VectorMutableThyra
 VectorMutable adapter subclass for Thyra::VectorBase. More...
class  AbstractLinAlgPack::VectorSpaceFactoryThyra
 VectorSpaceFactory adapter subclass for Thyra::VectorSpaceBase. More...
class  AbstractLinAlgPack::VectorSpaceThyra
 VectorSpace adapter subclass for Thyra::VectorSpaceBase<value_type> . More...

Main interface library

typedef SparseVector< SparseElement<
index_type, value_type >,
std::allocator< SparseElement<
index_type, value_type > > > 
SpVector
typedef SparseVectorSlice<
SparseElement< index_type,
value_type > > 
SpVectorSlice

Level 1 BLAS

void Vp_V_assert_compatibility (VectorMutable *v_lhs, const Vector &v_rhs)
 v_lhs += op v_rhs
void Vp_V_assert_compatibility (VectorMutable *v_lhs, const SpVectorSlice &sv_rhs)
 v_lhs += op sv_rhs
void VopV_assert_compatibility (const Vector &v_rhs1, const Vector &v_rhs2)
 v_rhs1 op v_rhs2
void VopV_assert_compatibility (const Vector &v_rhs1, const SpVectorSlice &sv_rhs2)
 v_rhs1 op sv_rhs2
void VopV_assert_compatibility (const SpVectorSlice &sv_rhs1, const Vector &v_rhs2)
 sv_rhs1 op v_rhs2
void Mp_M_assert_compatibility (MatrixOp *m_lhs, BLAS_Cpp::Transp trans_lhs, const MatrixOp &m_rhs, BLAS_Cpp::Transp trans_rhs)
 op(m_lhs) += op op(m_rhs)
void MopM_assert_compatibility (const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &m_rhs2, BLAS_Cpp::Transp trans_rhs2)
 op(m_rhs1) op op(m_rhs2)

Level 2 BLAS

void MtV_assert_compatibility (const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
 op(m_rhs1) * v_rhs2
void MtV_assert_compatibility (const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2)
 op(m_rhs1) * sv_rhs2
void Vp_MtV_assert_compatibility (VectorMutable *v_lhs, const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
 v_lhs += op(m_rhs1) * v_rhs2
void Vp_MtV_assert_compatibility (VectorMutable *v_lhs, const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2)
 v_lhs += op(m_rhs1) * sv_rhs2

Level 3 BLAS

void MtM_assert_compatibility (const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &m_rhs2, BLAS_Cpp::Transp trans_rhs2)
 op(m_lhs) += op(m_rhs1)
void Mp_MtM_assert_compatibility (MatrixOp *m_lhs, BLAS_Cpp::Transp trans_lhs, const MatrixOp &m_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &m_rhs2, BLAS_Cpp::Transp trans_rhs2)
 op(m_lhs) += op(m_rhs1) * op(m_rhs2)

Level-2 BLAS

void V_InvMtV (VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
 
void V_InvMtV (VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2)
 
value_type transVtInvMtV (const Vector &v_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3)
 
value_type transVtInvMtV (const SpVectorSlice &sv_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
 

Level-3 BLAS

void M_StInvMtM (MatrixOp *m_lhs, value_type alpha, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2)
 
void M_StMtInvM (MatrixOp *m_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsing &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
 

Level-1 BLAS

void Mt_S (MatrixOp *mwo_lhs, value_type alpha)
void Mp_StM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
void Mp_StMtP (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
 
void Mp_StPtM (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp M_trans)
 
void Mp_StPtMtP (MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
 

Level-2 BLAS

void Vp_StMtV (VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
 
void Vp_StMtV (VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta=1.0)
 
void Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta=1.0)
 
void Vp_StPtMtV (VectorMutable *v_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOp &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta=1.0)
 
value_type transVtMtV (const Vector &v_rhs1, const MatrixOp &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3)
 
value_type transVtMtV (const SpVectorSlice &sv_rhs1, const MatrixOp &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
 
void syr2k (const MatrixOp &M, BLAS_Cpp::Transp M_trans, value_type alpha, const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, value_type beta, MatrixSymOp *symwo_lhs)
 

Level-3 BLAS

void Mp_StMtM (MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 
void syrk (const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs)
 

Nonmember untility functions

template<class T_Element>
SparseVectorSlice< T_Element > create_slice (const SparseVectorUtilityPack::SpVecIndexLookup< T_Element > &index_lookup, size_type size, Range1D rng)
 Return a sparse vector slice.

[NOHEADER]

bool BFGS_sTy_suff_p_d (const Vector &s, const Vector &y, const value_type *sTy=NULL, std::ostream *out=NULL, const char func_name[]=NULL)
 Check that s'*y is sufficiently positive and print the result if it is not.

{\bf Conversion to Fortran compatable sparse compressed column

operations for COOMatrixTemplateInterface (Level 2,3 BLAS)}.

See the ConvertToCSC class.

template<class T_COOM>
size_type COOM_num_in_column (const T_COOM &m, BLAS_Cpp::Transp trans, size_type col_offset, const IVector::value_type *col_perm, size_type *num_in_col)
 
template<class T_COOM>
void COOM_insert_nonzeros (const T_COOM &m, BLAS_Cpp::Transp trans, value_type alpha, size_type row_offset, size_type col_offset, const IVector::value_type *row_perm, const IVector::value_type *col_perm, size_type *next_nz_in_col, FortranTypes::f_dbl_prec *D_val, FortranTypes::f_int *D_row_i)
 
template<class T_COOM>
value_type COOM_insert_scaled_nonzeros (const T_COOM &m, BLAS_Cpp::Transp trans, value_type scaled_max_ele, size_type row_offset, size_type col_offset, const IVector::value_type *row_perm, const IVector::value_type *col_perm, size_type *next_nz_in_col, FortranTypes::f_dbl_prec *D_val, FortranTypes::f_int *D_row_i)
 

{\bf Level-1 BLAS matrix-matrix element-wise operations}.

template<class T_Indice, class T_Value>
void Mp_StM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz()), space = O(1)).

{\bf Level-2 BLAS (vector-matrtix) Liner Algebra Operations}.

These are functions that implement linear algebra operations that have DVector or DVectorSlice objects as lhs operands and a mixture of matrix and DVectorSlice rhs operands.

template<class T_Indice, class T_Value>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).
template<class T_Indice, class T_Value>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta)
 vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

{\bf Level-3 BLAS (matrix-matrix) Linear Algebra Operations}.

template<class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM).
template<class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM).
template<class T_Indice, class T_Value, class M2>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const M2 &M2_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta)
 gms_lhs = alpha * op(coom_rhs1) * op(M2_rhs2) + beta * gms_lhs (right).
template<class M1, class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const M1 &M1_rhs1, BLAS_Cpp::Transp trans_rhs1, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &coom_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta)
 gms_lhs = alpha * op(M1_rhs1) * op(coom_rhs2) + beta * gms_lhs (right).

{\bf Level-1 BLAS matrix-matrix element-wise operations}.

template<class T_Indice, class T_Value>
void Mp_StM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz()), space = O(1)).

{\bf Level-2 BLAS (vector-matrtix) Liner Algebra Operations}.

These are functions that implement linear algebra operations that have DVector or DVectorSlice objects as lhs operands and a mixture of matrix and DVectorSlice rhs operands.

template<class T_Indice, class T_Value>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).
template<class T_Indice, class T_Value>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta)
 vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

{\bf Level-3 BLAS (matrix-matrix) Linear Algebra Operations}.

template<class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM).
template<class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM).
template<class T_Indice, class T_Value, class M2>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const M2 &M2_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta)
 gms_lhs = alpha * op(coom_rhs1) * op(M2_rhs2) + beta * gms_lhs (right).
template<class M1, class T_Indice, class T_Value>
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const M1 &M1_rhs1, BLAS_Cpp::Transp trans_rhs1, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &coom_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta)
 gms_lhs = alpha * op(M1_rhs1) * op(coom_rhs2) + beta * gms_lhs (right).

{\bf Templated Matrix-DVector Operations}.

These are the declarations (AbstractLinAlgPack_MatrixVectorTemplateOp.hpp) for template functions for performing selected matrix-vector and matrix-matrix operations. The templated matrix type must have the following interface: {itemize} T_Matrix::size_type# - Member type for the type returned by rows# and cols# #T_Matrix::row_type# - Member type for the type returned by #row(i)# #T_Matrix::col_type# - Member type for the type returned by #col(j)# T_Matrix::size_type T_Matrix::rows() const# T_Matrix::size_type T_Matrix::cols() const# #const T_Matrix::row_type& T_Matrix::row(size_type i) const# \
  • Returns a reference to the ith row (1,2,...,T_Matrix::rows()#). #const T_Matrix::col_type& T_Matrix::col(size_type j) const# \
  • Returns a reference to the ith row (1,2,...,T_Rect_Matrix::rows()#). {itemize}

In addition, the following operations (UML notation) must be accessible for the types #T_Matrix::row_type# and #T_Matrix::col_type# when these template functions are instantiated:

assign(v_lhs:DVector&,v_rhs:T_Matrix::const row_type&) assign(vs_lhs:DVectorSlice&,v_rhs:const T_Matrix::row_type&) dot(vs_rhs1:const DVectorSlice&, vs_rhs2: const T_Matrix::row_type&):value_type dot(vs_rhs1:const DVectorSlice&, vs_rhs2: const T_Matrix::col_type&):value_type

template<class T_Matrix>
void assign (DMatrix &gm_lhs, const T_Matrix &gm_rhs, BLAS_Cpp::Transp trans_rhs)
 gm_lhs = T_M (templated matrix type T_M)
template<class T_Matrix>
void assign (DMatrixSlice &gms_lhs, const T_Matrix &gm_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs = T_M (templated matrix type T_M)
template<class T_Matrix>
void V_MtV (DVector &v_lhs, const T_Matrix &gm_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = T_M * vs_lhs (templated matrix type T_M)
template<class T_Matrix>
void V_MtV (DVectorSlice &v_lhs, const T_Matrix &gm_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = T_M * vs_lhs (templated matrix type T_M)

Template operations for sparse vectors.

These functions implement level 1 and 2 BLAS like linear algebra operations on unsorted sparse vectors. These templated sparse vector objects give information about the sparse vector (size, nonzeros etc.) and give access to the sparse elements as iterators. The iterators yield sparse elements that give the elements indice in the full vector and its value.

The specification for these interfaces is as follows:

{verbatim} class SparseElementTemplateInterface { public: typedef .... value_type; typedef .... indice_type;

value_type& value(); value_type value() const; indice_type indice() const; };

class SparseVectorTemplateInterface { public: typedef ... difference_type; typedef ... element_type; // SparseElementTemplateInterface compliant typedef ... iterator; // *(iter) yields a element_type typedef ... const_iterator; // *(iter) yields a const element_type typedef ... reverse_iterator; // *(iter) yields a element_type typedef ... const_reverse_iterator; // *(iter) yields a const element_type

Information size_type size() const; // size of the full vector size_type nz() const; // number of nonzero elements difference_type offset() const; // ith real real indice = begin()[i-1] + offset() bool is_sorted() const; // true if elements are sorted by indice

iterate forward (sorted) through elemlents iterator begin(); const_iterator begin() const; iterator end(); const_iterator end() const;

iterate backward (sorted) through elemlents reverse_iterator rbegin(); const_reverse_iterator rbegin() const; reverse_iterator rend(); const_reverse_iterator rend() const; }; /end{verbatim}

In all of these functions where we have some operation that yields a dense vector being added to another function such as:

v_lhs = operation + vs_rhs2

it is allowed that v_lhs.overlap(vs_rhs2) == SAME_MEM. In this case no unnecesary operations will be performed. Also, it is up the the user to ensure that there is not an alias problem where if v_lhs is the same as vs_rhs2 and vs_rhs2 is also used in the operation. This has undefined results. If a future version of the library this may be handeled but for now it is not.

These operations use the same nameing convensions as those for DVector and DVectorSlice in DenseLinAlgPack with the acception that the sparse vectors are given the tag #SV# instead of #V# so as to not destroy the intended behavior of the operations in DenseLinAlgPack and the implicit conversion of a DVector to a DVectorSlice.

It should be noted that these operations will be more efficient for large dense vectors and sparse vectors with many nonzero elements if the sparse elements are sorted by indice. This is because in many operations the elements of the dense vectors are accessed using random access and this could cause virtual page thrashing if the nonzero sparse elements are not sorted.

template<class T_SpVec>
value_type dot_V_SV (const DVectorSlice &vs_rhs1, const T_SpVec &sv_rhs2)
 result = dot(vs_rhs1,sv_rhs2) (BLAS xDOT)
template<class T_SpVec>
value_type dot_SV_V (const T_SpVec &sv_rhs1, const DVectorSlice &vs_rhs2)
 result = dot(sv_rhs1,vs_rhs2) (BLAS xDOT)
template<class T_SpVec>
value_type norm_1_SV (const T_SpVec &sv_rhs)
 result = ||sv_rhs||1 (BLAS xASUM)
template<class T_SpVec>
value_type norm_2_SV (const T_SpVec &sv_rhs)
 result = ||sv_rhs||2 (BLAS xNRM2)
template<class T_SpVec>
value_type norm_inf_SV (const T_SpVec &sv_rhs)
 result = ||sv_rhs||inf (BLAS IxAMAX)
template<class T_SpVec>
value_type max_SV (const T_SpVec &sv_rhs)
 result = max(sv_rhs)
template<class T_SpVec>
value_type min_SV (const T_SpVec &sv_rhs)
 result = min(sv_rhs)
template<class T_SpVec>
void Vt_S (T_SpVec *sv_lhs, value_type alpha)
 sv_lhs *= alpha (BLAS xSCAL)
template<class T_SpVec>
void Vp_StSV (DVectorSlice *vs_lhs, value_type alpha, const T_SpVec &sv_rhs)
 vs_lhs += alpha * sv_rhs (BLAS xAXPY)
template<class T_SpVec>
void Vp_StMtSV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const T_SpVec &sv_rhs2)
 vs_lhs += alpha * op(gms_rhs1) * sv_rhs2 (BLAS xGEMV)
template<class T_SpVec>
void Vp_StMtSV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceTri &tri_rhs1, BLAS_Cpp::Transp trans_rhs1, const T_SpVec &sv_rhs2)
 vs_lhs += alpha * op(tri_gms_rhs1) * sv_rhs2 (BLAS xTRMV)
template<class T_SpVec>
void Vp_StMtSV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceSym &sym_rhs1, BLAS_Cpp::Transp trans_rhs1, const T_SpVec &sv_rhs2)
 vs_lhs += alpha * op(sym_gms_rhs1) * sv_rhs2 (BLAS xSYMV)

Inline functions to call linear algebra operations for SparseVectoSlice<> objects.

These inline functions use the same exact syntax as the DenseLinAlgPack linear algebra operations. They call the generic templated linear algebra operations for the SparseVectorTemplateInterface interface. With these functions the abreaviation for the sparse vector #SV# is replaced with the standard #V#. The assignmet operation #V_SV# is replaced with the more uniform assign# identifier so as to be compatable with DenseLinAlgPack naming. Also, the suffixes for dot#, norm_1#, and the other level one BLAS operations is dropped.

In order to use SparseVector<> objects with these functions the client must perform an explicit conversion. For example the following code will not compile (can not perform conversion from const SparseVector<> to const SparseVectorSlice<>):

SparseVector<element_type> sv; // ... cout << norm_1(sv);

Instead you must perform an explicit conversion for example by using operator()() as follows:

cout << norm_1(sv());

template<class T_Ele>
value_type dot (const DVectorSlice &vs_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2)
 begin Sparse BLAS operations result = dot(vs_rhs1,sv_rhs2) (BLAS xDOT)
template<class T_Ele>
value_type dot (const SparseVectorSlice< T_Ele > &sv_rhs1, const DVectorSlice &vs_rhs2)
 result = dot(sv_rhs1,vs_rhs2) (BLAS xDOT)
template<class T_Ele>
value_type norm_1 (const SparseVectorSlice< T_Ele > &sv_rhs)
 result = ||sv_rhs||1 (BLAS xASUM)
template<class T_Ele>
value_type norm_2 (const SparseVectorSlice< T_Ele > &sv_rhs)
 result = ||sv_rhs||2 (BLAS xNRM2)
template<class T_Ele>
value_type norm_inf (const SparseVectorSlice< T_Ele > &sv_rhs)
 result = ||sv_rhs||inf (BLAS IxAMAX)
template<class T_Ele>
value_type max (const SparseVectorSlice< T_Ele > &sv_rhs)
 result = max(sv_rhs)
template<class T_Ele>
value_type min (const SparseVectorSlice< T_Ele > &sv_rhs)
 result = min(sv_rhs)
template<class T_Ele>
void Vp_StV (DVectorSlice *vs_lhs, value_type alpha, const SparseVectorSlice< T_Ele > &sv_rhs)
 vs_lhs += alpha * sv_rhs (BLAS xAXPY)
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2)
 vs_lhs += alpha * op(gms_rhs1) * sv_rhs2 (BLAS xGEMV)
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceTri &tri_gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2)
 vs_lhs += alpha * op(tri_gms_rhs1) * sv_rhs2 (BLAS xTRMV)
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceSym &sym_gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2)
 vs_lhs += alpha * op(sym_gms_rhs1) * sv_rhs2 (BLAS xSYMV)
template<class M, class T_Ele>
void Vp_StMtSVS (DVectorSlice *vs_lhs, value_type alpha, const M &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2, value_type beta)
 vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2, value_type beta)
 vs_lhs = alpha * op(gms_rhs1) * sv_rhs2 + beta * vs_lhs
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceTri &tri_gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2, value_type beta)
 vs_lhs = alpha * op(tri_gms_rhs1) * sv_rhs2 + beta * vs_lhs
template<class T_Ele>
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const DMatrixSliceSym &sym_gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const SparseVectorSlice< T_Ele > &sv_rhs2, value_type beta)
 vs_lhs = alpha * op(sym_gms_rhs1) * sv_rhs2 + beta * vs_lhs

Operations for GenPermMatrixSlice.

ToDo: Finish documentation!

void V_StMtV (SpVector *sv_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const DVectorSlice &vs_rhs2)
 sv_lhs = alpha * op(P_rhs1) * vs_rhs2.
void V_MtV (SpVector *sv_lhs, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const DVectorSlice &vs_rhs2)
 sv_lhs = op(P_rhs1) * vs_rhs2
void V_StMtV (SpVector *sv_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const SpVectorSlice &sv_rhs2)
 sv_lhs = alpha * op(P_rhs1) * sv_rhs2.
void V_MtV (SpVector *sv_lhs, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const SpVectorSlice &sv_rhs2)
 sv_lhs = op(P_rhs1) * sv_rhs2
void Vp_StMtV (SpVector *sv_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const DVectorSlice &vs_rhs2)
 sv_lhs += alpha * op(P_rhs1) * vs_rhs2.
void Vp_MtV (SpVector *sv_lhs, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const DVectorSlice &vs_rhs2)
 sv_lhs += op(P_rhs1) * vs_rhs2.
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const DVectorSlice &vs_rhs2, value_type beta=1.0)
 vs_lhs = alpha * op(P_rhs1) * vs_rhs2 + beta * vs_lhs
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const SpVectorSlice &sv_rhs2, value_type beta=1.0)
 vs_lhs = alpha * op(P_rhs1) * sv_rhs2 + beta * vs_lhs
void intersection (const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, size_type *Q_nz, const size_type Q_max_nz=0, size_type Q_row_i[]=NULL, size_type Q_col_j[]=NULL, GenPermMatrixSlice *Q=NULL)
 Find the intersection between two GenPermMatrixSlice objects.

Level-2 BLAS

void V_InvMtV (DVector *v_lhs, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 v_lhs = inv(op(M_rhs1)) * vs_rhs2
void V_InvMtV (DVectorSlice *vs_lhs, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs = inv(op(M_rhs1)) * vs_rhs2
void V_InvMtV (DVector *v_lhs, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2)
 v_lhs = inv(op(M_rhs1)) * sv_rhs2
void V_InvMtV (DVectorSlice *vs_lhs, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2)
 vs_lhs = inv(op(M_rhs1)) * sv_rhs2
value_type transVtInvMtV (const DVectorSlice &vs_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const DVectorSlice &sv_rhs3)
 result = vs_rhs1' * inv(op(M_rhs2)) * vs_rhs3
value_type transVtInvMtV (const SpVectorSlice &sv_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
 result = sv_rhs1' * inv(op(M_rhs2)) * sv_rhs3

Level-3 BLAS

void M_StInvMtM (DMatrix *gm_lhs, value_type alpha, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gm_lhs = alpha * inv(op(M_rhs1)) * op(gms_rhs2) (right)
void M_StInvMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs = alpha * inv(op(M_rhs1)) * op(gms_rhs2) (right)
void M_StMtInvM (DMatrix *gm_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gm_lhs = alpha * op(gms_rhs1) * inv(op(M_rhs2)) (left)
void M_StMtInvM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs = alpha * op(gms_rhs1) * inv(op(M_rhs2)) (left)
void M_StInvMtM (DMatrix *gm_lhs, value_type alpha, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gm_lhs = alpha * inv(op(M_rhs1)) * op(mwo_rhs2) (right)
void M_StInvMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixNonsingSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs = alpha * inv(op(M_rhs1)) * op(mwo_rhs2) (right)
void M_StMtInvM (DMatrix *gm_lhs, value_type alpha, const MatrixOpSerial &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gm_lhs = alpha * op(mwo_rhs1) * inv(op(M_rhs2)) (left)
void M_StMtInvM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixNonsingSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs = alpha * op(mwo_rhs1) * inv(op(M_rhs2)) (left)

Level-1 BLAS

void Mp_StM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs += alpha * op(M_rhs) (BLAS xAXPY)
void Mp_StMtP (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans)
 gms_lhs += alpha * op(M_rhs) * op(P_rhs)
void Mp_StPtM (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp M_trans)
 gms_lhs += alpha * op(P) * op(M_rhs)
void Mp_StPtMtP (DMatrixSlice *gms_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs, BLAS_Cpp::Transp trans_rhs, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans)
 gms_lhs += alpha * op(P_rhs1) * op(M_rhs) * op(P_rhs2)

Level-2 BLAS

void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta=1.0)
 vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV)
void Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice &sv_rhs2, value_type beta=1.0)
 vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs (BLAS xGEMV)
void Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const DVectorSlice &vs_rhs3, value_type beta=1.0)
 vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * vs_rhs3 + beta * vs_rhs
void Vp_StPtMtV (DVectorSlice *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp M_rhs2_trans, const SpVectorSlice &sv_rhs3, value_type beta=1.0)
 vs_lhs = alpha * op(P_rhs1) * op(M_rhs2) * sv_rhs3 + beta * vs_rhs
value_type transVtMtV (const DVectorSlice &vs_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const DVectorSlice &vs_rhs3)
 result = vs_rhs1' * op(M_rhs2) * vs_rhs3
value_type transVtMtV (const SpVectorSlice &sv_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice &sv_rhs3)
 result = sv_rhs1' * op(M_rhs2) * sv_rhs3

Level-3 BLAS

void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(M_rhs1) * op(gms_rhs2) + beta * gms_lhs (right) (xGEMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(gms_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xGEMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &gms_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(mwo_rhs1) * op(mwo_rhs2) + beta * gms_lhs (right) (xGEMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSliceSym &sym_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(M_rhs1) * op(sym_rhs2) + beta * gms_lhs (right) (xSYMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSliceSym &sym_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(sym_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xSYMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const MatrixOpSerial &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSliceTri &tri_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(M_rhs1) * op(tri_rhs2) + beta * gms_lhs (right) (xTRMM)
void Mp_StMtM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSliceTri &tri_rhs1, BLAS_Cpp::Transp trans_rhs1, const MatrixOpSerial &M_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta=1.0)
 gms_lhs = alpha * op(tri_rhs1) * op(M_rhs2) + beta * gms_lhs (left) (xTRMM)

Typedefs

typedef RTOp_index_type size_type
typedef RTOp_value_type value_type
typedef RTOp_index_type index_type
typedef DenseLinAlgPack::VectorTmpl<
value_type
DVector
 
typedef DenseLinAlgPack::VectorSliceTmpl<
value_type
DVectorSlice
 
typedef DenseLinAlgPack::DMatrix DMatrix
 
typedef DenseLinAlgPack::DMatrixSlice DMatrixSlice
 
typedef DenseLinAlgPack::DMatrixSliceTriEle DMatrixSliceTriEle
 
typedef DenseLinAlgPack::DMatrixSliceTri DMatrixSliceTri
 
typedef DenseLinAlgPack::DMatrixSliceSym DMatrixSliceSym
 
typedef RangePack::Range1D Range1D
 

Enumerations

enum  EApplyBy { APPLY_BY_ROW, APPLY_BY_COL }
  More...

Functions

void apply_op_validate_input (const char func_name[], const RTOpPack::RTOp &op, const size_t num_vecs, const Vector *vecs[], const size_t num_targ_vecs, VectorMutable *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type first_ele, const index_type sub_dim, const index_type global_offset)
 Validate the inputs to apply_op().
void apply_op_serial (const RTOpPack::RTOp &op, const size_t num_vecs, const Vector *vecs[], const size_t num_targ_vecs, VectorMutable *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type first_ele, const index_type sub_dim, const index_type global_offset)
 Implements reduction/transformation operators for any serial vectors using just the public vector interface.
std::ostream & operator<< (std::ostream &out, const GenPermMatrixSlice &P)
 Print the contents of a GenPermMatrixSlice object in machine readable format.
std::ostream & operator<< (std::ostream &o, const MatrixOp &M)
 Output operator for {MatrixOp} objects.
void M_StMtInvMtM (MatrixSymOp *sym_gms_lhs, value_type alpha, const MatrixOp &mwo, BLAS_Cpp::Transp mwo_trans, const MatrixSymNonsing &mswof, MatrixSymNonsing::EMatrixDummyArg mwo_rhs)
 
void Mp_StPtMtP (MatrixSymOp *sym_lhs, value_type alpha, MatrixSymOp::EMatRhsPlaceHolder dummy_place_holder, const MatrixSymOp &M, const GenPermMatrixSlice &gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans, value_type beta=1.0)
 
void Mp_StMtMtM (MatrixSymOp *sym_lhs, value_type alpha, MatrixSymOp::EMatRhsPlaceHolder dummy_place_holder, const MatrixSymOp &M, const MatrixOp &mwo_rhs, BLAS_Cpp::Transp mwo_rhs_trans, value_type beta=1.0)
 
void apply_op (EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_objs[]=NULL, const index_type primary_first_ele=1, const index_type primary_sub_dim=0, const index_type primary_global_offset=0, const index_type secondary_first_ele=1, const index_type secondary_sub_dim=0)
 Apply a reduction/transformation operator column by column and return an array of the reduction objects.
void apply_op (EApplyBy apply_by, const RTOpPack::RTOp &primary_op, const RTOpPack::RTOp &secondary_op, const size_t num_multi_vecs, const MultiVector *multi_vecs[], const size_t num_targ_multi_vecs, MultiVectorMutable *targ_multi_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type primary_first_ele=1, const index_type primary_sub_dim=0, const index_type primary_global_offset=0, const index_type secondary_first_ele=1, const index_type secondary_sub_dim=0)
 Apply a reduction/transformation operator column by column and reduce the intermediate reduction objects into one reduction object.
std::ostream & operator<< (std::ostream &o, const Permutation &P)
 Output operator for Permutation objects.
std::ostream & operator<< (std::ostream &os, const SpVectorSlice &svs)
 SpVectorSlice output stream operator.
RTOpPack::SparseSubVector sub_vec_view (const SpVectorSlice &sv, const Range1D &rng=Range1D())
 Create an RTOpPack::SparseSubVector view object from a SpVectorSlice object.
void apply_op (const RTOpPack::RTOp &op, const size_t num_vecs, const Vector *vecs[], const size_t num_targ_vecs, VectorMutable *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type first_ele=1, const index_type sub_dim=0, const index_type global_offset=0)
 Apply a reduction/transformation,operation over a set of vectors: op(op(v[0]...v[nv-1],z[0]...z[nz-1]),(*reduct_obj)) -> z[0]...z[nz-1],(*reduct_obj).
void Vp_StMtV (VectorMutable *y, value_type alpha, const GenPermMatrixSlice &P, BLAS_Cpp::Transp P_trans, const Vector &x, value_type beta=1.0)
 y = alpha * op(P) * x + beta *y
std::ostream & operator<< (std::ostream &o, const Vector &v)
 Output operator for {Vector} objects.
value_type sum (const Vector &v_rhs)
 result = sum( v_rhs(i), i = 1,,,dim )
value_type dot (const Vector &v_rhs1, const Vector &v_rhs2)
 result = v_rhs1' * v_rhs2
value_type dot (const Vector &v_rhs1, const SpVectorSlice &sv_rhs2)
 result = v_rhs1' * sv_rhs2
value_type dot (const SpVectorSlice &sv_rhs1, const Vector &v_rhs2)
 result = sv_rhs1' * v_rhs2
void max_abs_ele (const Vector &v, value_type *max_v_j, index_type *max_j)
 Compute the maximum element in a vector.
void Vp_S (VectorMutable *v_lhs, const value_type &alpha)
 v_lhs += alpha
void Vt_S (VectorMutable *v_lhs, const value_type &alpha)
 v_lhs *= alpha
void Vp_StV (VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
 v_lhs = alpha * v_rhs + v_lhs
void Vp_StV (VectorMutable *v_lhs, const value_type &alpha, const SpVectorSlice &sv_rhs)
 v_lhs = alpha * sv_rhs + v_lhs
void ele_wise_prod (const value_type &alpha, const Vector &v_rhs1, const Vector &v_rhs2, VectorMutable *v_lhs)
 v_lhs(i) += alpha * v_rhs1(i) * v_rhs2(i), i = 1,,,dim.
void ele_wise_divide (const value_type &alpha, const Vector &v_rhs1, const Vector &v_rhs2, VectorMutable *v_lhs)
 v_lhs(i) = alpha * v_rhs1(i) / v_rhs2(i), i = 1,,,dim.
void seed_random_vector_generator (unsigned int)
 Seed the random number generator.
void random_vector (value_type l, value_type u, VectorMutable *v)
 Generate a random vector with elements uniformly distrubuted elements.
void sign (const Vector &v, VectorMutable *z)
 Compute the sign of each element in an input vector.
bool assert_print_nan_inf (const value_type &val, char name[], bool throw_excpt, std::ostream *out)
 This function asserts if a value_type scalare is a NaN or Inf and optionally prints out these entires.
bool assert_print_nan_inf (const Vector &v, char name[], bool throw_excpt, std::ostream *out)
 This function asserts if a vector has any NaN or inf entries and optionally prints out these entires.
bool TestMatrixSymSecant (const MatrixOp &B, const Vector &s, const Vector &y, value_type warning_tol, value_type error_tol, bool print_all_warnings, std::ostream *out, bool trase=true)
 Checks the secant condition B*s = y.
value_type max_element (const Vector &v)
 Compute the maximum element in a vector.
std::pair< value_type, value_typemax_near_feas_step (const Vector &x, const Vector &d, const Vector &xl, const Vector &xu, value_type max_bnd_viol)
 Computes the maximum positive and negative step that can be taken that are within the relaxed bounds.
value_type max_rel_step (const Vector &x, const Vector &d)
 Computes the maximum relative step of x = x + d.
value_type fraction_to_boundary (const value_type tau, const Vector &x, const Vector &d, const Vector &xl, const Vector &xu)
value_type fraction_to_zero_boundary (const value_type tau, const Vector &x, const Vector &d)
size_type num_bounded (const Vector &xl, const Vector &xu, value_type inf_bound)
 Count the number of finitly bounded elements in xl <= x <= xu.
value_type log_bound_barrier (const Vector &x, const Vector &xl, const Vector &xu)
 Computes the log barrier term:.
value_type combined_nu_comp_err (const Vector &v, const Vector &x, const Vector &xl, const Vector &xu)
 Computes an estimate of the complementarity error.
value_type combined_nu_comp_err_lower (const Vector &v, const Vector &x, const Vector &xl)
 Computes an estimate of the complementarity error when only the lower bounds are non-infinite.
value_type combined_nu_comp_err_upper (const Vector &v, const Vector &x, const Vector &xu)
 Computes an estimate of the complementarity error when only the upper bounds are non-infinite.
value_type IP_comp_err_with_mu (const value_type mu, const value_type inf_bound, const Vector &x, const Vector &xl, const Vector &xu, const Vector &vl, const Vector &vu)
 Computes the complementarity error for a primal/dual interior point algorithm using inf norm.
bool max_inequ_viol (const AbstractLinAlgPack::Vector &v, const AbstractLinAlgPack::Vector &vL, const AbstractLinAlgPack::Vector &vU, AbstractLinAlgPack::size_type *max_viol_i, AbstractLinAlgPack::value_type *max_viol, AbstractLinAlgPack::value_type *v_i, int *bnd_type, AbstractLinAlgPack::value_type *vLU_i)
 Compute the maximum violation from a set of inequality constraints vL <= v <= vU.
void force_in_bounds (const Vector &xl, const Vector &xu, VectorMutable *x)
 Force a vector in bounds.
void force_in_bounds_buffer (const value_type rel_push, const value_type abs_push, const Vector &xl, const Vector &xu, VectorMutable *x)
 Force a vector sufficiently within bounds according to a specified absolute and relative buffer.
void inv_of_difference (const value_type alpha, const Vector &v0, const Vector &v1, VectorMutable *z)
 Computes the inverse of the difference between two vectors.
void correct_lower_bound_multipliers (const Vector &xl, const value_type inf_bound_limit, VectorMutable *vl)
 Corrects the lower bound multipliers with infinite bounds.
void correct_upper_bound_multipliers (const Vector &xu, const value_type inf_bound_limit, VectorMutable *vu)
 Corrects the upper bound multipliers with infinite bounds.
void lowerbound_multipliers_step (const value_type mu, const Vector &invXl, const Vector &vl, const Vector &d_k, VectorMutable *dvl)
 Calculates the multiplier step for lower bounds.
void upperbound_multipliers_step (const value_type mu, const Vector &invXu, const Vector &vu, const Vector &d_k, VectorMutable *dvu)
 Calculates the multiplier step for the upper bounds.
void ele_wise_sqrt (VectorMutable *z)
 Calculates the sqrt of each element in the vector Pre Condition: all elements of z must be positive.
void max_vec_scalar (value_type min_ele, VectorMutable *y)
 Take the maximum value of the vector elements and a scalar.
void max_abs_vec_scalar (value_type min_ele, VectorMutable *y)
 Take the maximum value of the absolute vector elements and a scalar.
std::istream & operator>> (std::istream &istrm, COOMatrix &coom)
 Inputstream stream operator for COOMatrix.
std::ostream & operator<< (std::ostream &o, const COOMatrix &coom)
 Output stream operator for COOMatrix.
std::ostream & output (std::ostream &o, const COOMatrix &coom)
 Output stream function for COOMatrix.
template<class T_Indice, class T_Value>
COOMatrixPartitionedViewUtilityPack::TransposedPartition<
T_Indice, T_Value > 
trans (COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &part)
 Create a transposed view of a partition object.
template<class T_COOM>
void Mp_StCOOM (DMatrixSlice *gms_lhs, value_type alpha, const T_COOM &coom_rhs, BLAS_Cpp::Transp trans_rhs)
 gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz(), space = O(1))
template<class T_COOM>
void Vp_StCOOMtV (DVectorSlice *vs_lhs, value_type alpha, const T_COOM &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2)
 vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz(), space = O(1))
template<class T_COOM>
void Mp_StCOOMtM (DMatrixSlice *gms_lhs, value_type alpha, const T_COOM &coom_rhs1, BLAS_Cpp::Transp trans_rhs1, const DMatrixSlice &gms_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM)
template<class T_COOM>
void Mp_StMtCOOM (DMatrixSlice *gms_lhs, value_type alpha, const DMatrixSlice &gms_rhs1, BLAS_Cpp::Transp trans_rhs1, const T_COOM &coom_rhs2, BLAS_Cpp::Transp trans_rhs2)
 gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM)
template<class T_COOM>
std::ostream & output_COOM (std::ostream &os, const T_COOM &coom, SparseLinAlgPackIO::fmtflags extra_flags)
 COO matrix output stream function.
template<class T_Indice, class T_Value>
std::ostream & operator<< (std::ostream &os, const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &part)
 Partition<> output stream operator.
template<class T_Indice, class T_Value>
std::ostream & operator<< (std::ostream &os, const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &trans_part)
 TransposedPartition<> output stream operator.
template<class M_t, class V_t>
void dense_Vp_StPtMtV (DVectorSlice *y, value_type a, const GenPermMatrixSlice &P, BLAS_Cpp::Transp P_trans, const M_t &M, BLAS_Cpp::Transp M_trans, const V_t &x, value_type b)
 Implements y = b*y + a*op(P)*op(M)*x where it is assumed that generating rows of op(M) is cheap compared to computing op(M)*x.
void rank_2_chol_update (const value_type a, DVectorSlice *u, const DVectorSlice &v, DVectorSlice *w, DMatrixSliceTriEle *R, BLAS_Cpp::Transp R_trans)
 Update the cholesky factor of symmetric positive definite matrix for a rank-2 update.
void imp_sparse_bnd_diff (int sign, const SpVectorSlice &sv, BLAS_Cpp::Uplo uplo, const DVectorSlice &v, DVectorSlice *r)
 Take the difference between a spare lower bound vector and a dense vector.
void read_coo_into_valarrays (std::istream &istrm, size_type &m, size_type &n, size_type &nz, std::valarray< value_type > &a, std::valarray< indice_type > &ivect, std::valarray< indice_type > &jvect)
 Read in a Coordinate Matrix from a C++ input stream and store it in valarrays.
template<class T_Indice, class T_Value>
std::ostream & operator<< (std::ostream &o, const SparseElement< T_Indice, T_Value > &ele)
 Outputs a SparseElement<> object.
void add_elements (SpVector *sv_lhs, value_type alpha, const DVectorSlice &vs_rhs, size_type offset=0, bool add_zeros=true)
 Add elements from a dense vector to a sparse vector.
void add_elements (SpVector *sv_lhs, value_type alpha, const SpVectorSlice &sv_rhs, size_type offset=0, bool add_zeros=true)
 Add elements from a sparse vector to another sparse vector.
DVectorSlice dense_view (SpVectorSlice &sv_rhs)
 Create a dense representation of a sparse vector.
const DVectorSlice dense_view (const SpVectorSlice &sv_rhs)
 
template<class Iter, class Cat, class Indice, class ValRef, class Diff>
TransSparseCOOElementViewIter<
Iter, Cat, Indice, ValRef,
Diff > 
operator+ (Diff n, const TransSparseCOOElementViewIter< Iter, Cat, Indice, ValRef, Diff > itr)
void M_StMtInvMtM (DMatrixSliceSym *sym_gms_lhs, value_type alpha, const MatrixOpSerial &mwo, BLAS_Cpp::Transp mwo_trans, const MatrixSymNonsingSerial &mswons, MatrixSymNonsingSerial::EMatrixDummyArg mwo_rhs)
 sym_gms_lhs = alpha * op(mwo) * inv(mswof) * op(mwo)'
void Mp_StPtMtP (DMatrixSliceSym *sym_lhs, value_type alpha, MatrixSymOpSerial::EMatRhsPlaceHolder dummy_place_holder, const MatrixSymOpSerial &M, const GenPermMatrixSlice &gpms_rhs, BLAS_Cpp::Transp gpms_rhs_trans, value_type beta=1.0)
 sym_lhs = alpha * op(gpms_rhs') * M * op(gpms_rhs) + beta * sym_lhs.
void Mp_StMtMtM (DMatrixSliceSym *sym_lhs, value_type alpha, MatrixSymOpSerial::EMatRhsPlaceHolder dummy_place_holder, const MatrixSymOpSerial &M, const MatrixOpSerial &mwo_rhs, BLAS_Cpp::Transp mwo_rhs_trans, value_type beta=1.0)
 sym_lhs = alpha * op(mwo_rhs') * M * op(mwo_rhs) + beta * sym_lhs
int exampleNLPDiagSetup (int argc, char *argv[], MPI_Comm comm, Teuchos::RefCountPtr< const VectorSpace > *vec_space, size_type *n, value_type *xo, bool *has_bounds, bool *dep_bounded)
 Create a vector space given the input arguments argc, argv[] and an MPI communicator.
void get_thyra_vector (const VectorSpaceThyra &thyra_vec_spc, const Vector &vec, Teuchos::RefCountPtr< const Thyra::VectorBase< value_type > > *thyra_vec)
 
void free_thyra_vector (const VectorSpaceThyra &thyra_vec_spc, const Vector &vec, Teuchos::RefCountPtr< const Thyra::VectorBase< value_type > > *thyra_vec)
 
void get_thyra_vector (const VectorSpaceThyra &thyra_vec_spc, VectorMutable *vec, Teuchos::RefCountPtr< Thyra::VectorBase< value_type > > *thyra_vec)
 
void commit_thyra_vector (const VectorSpaceThyra &thyra_vec_spc, VectorMutable *vec, Teuchos::RefCountPtr< Thyra::VectorBase< value_type > > *thyra_vec)
 


Typedef Documentation

typedef RTOp_index_type AbstractLinAlgPack::size_type
 

Definition at line 43 of file AbstractLinAlgPack_Types.hpp.

typedef RTOp_value_type AbstractLinAlgPack::value_type
 

Definition at line 44 of file AbstractLinAlgPack_Types.hpp.

typedef RTOp_index_type AbstractLinAlgPack::index_type
 

Definition at line 45 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::VectorTmpl<value_type> AbstractLinAlgPack::DVector
 

Definition at line 49 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::VectorSliceTmpl<value_type> AbstractLinAlgPack::DVectorSlice
 

Definition at line 51 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::DMatrix AbstractLinAlgPack::DMatrix
 

Definition at line 53 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::DMatrixSlice AbstractLinAlgPack::DMatrixSlice
 

Definition at line 55 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::DMatrixSliceTriEle AbstractLinAlgPack::DMatrixSliceTriEle
 

Definition at line 57 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::DMatrixSliceTri AbstractLinAlgPack::DMatrixSliceTri
 

Definition at line 59 of file AbstractLinAlgPack_Types.hpp.

typedef DenseLinAlgPack::DMatrixSliceSym AbstractLinAlgPack::DMatrixSliceSym
 

Definition at line 61 of file AbstractLinAlgPack_Types.hpp.

typedef RangePack::Range1D AbstractLinAlgPack::Range1D
 

Definition at line 63 of file AbstractLinAlgPack_Types.hpp.

typedef SparseVector< SparseElement<index_type,value_type> , std::allocator< SparseElement<index_type,value_type> > > AbstractLinAlgPack::SpVector
 

Definition at line 134 of file AbstractLinAlgPack_Types.hpp.

typedef SparseVectorSlice< SparseElement<index_type,value_type> > AbstractLinAlgPack::SpVectorSlice
 

Definition at line 136 of file AbstractLinAlgPack_Types.hpp.


Enumeration Type Documentation

enum EApplyBy
 

Enumeration values:
APPLY_BY_ROW 
APPLY_BY_COL 

Definition at line 39 of file AbstractLinAlgPack_MultiVector.hpp.


Function Documentation

void AbstractLinAlgPack::apply_op_validate_input const char  func_name[],
const RTOpPack::RTOp op,
const size_t  num_vecs,
const Vector *  vecs[],
const size_t  num_targ_vecs,
VectorMutable *  targ_vecs[],
RTOpPack::ReductTarget reduct_obj,
const index_type  first_ele,
const index_type  sub_dim,
const index_type  global_offset
 

Validate the inputs to apply_op().

Throws an exception if one of the preconditions is not met.

ToDo: Finish documentation.

Definition at line 12 of file AbstractLinAlgPack_apply_op_helper.cpp.

void AbstractLinAlgPack::apply_op_serial const RTOpPack::RTOp op,
const size_t  num_vecs,
const Vector *  vecs[],
const size_t  num_targ_vecs,
VectorMutable *  targ_vecs[],
RTOpPack::ReductTarget reduct_obj,
const index_type  first_ele,
const index_type  sub_dim,
const index_type  global_offset
 

Implements reduction/transformation operators for any serial vectors using just the public vector interface.

Note that this function does not validate the input arguments so it is up to the client to do that (i.e. by calling apply_op_validate_input()).

ToDo: Finish documentation!

Definition at line 60 of file AbstractLinAlgPack_apply_op_helper.cpp.

std::ostream & AbstractLinAlgPack::operator<< std::ostream &  out,
const GenPermMatrixSlice &  P
 

Print the contents of a GenPermMatrixSlice object in machine readable format.

The format is:

{varbatim} rows cols nz row_i(1):col_j(1) ... row_i(nz):col_j(nz) {verbatim}

Definition at line 34 of file AbstractLinAlgPack_GenPermMatrixSliceOut.cpp.

std::ostream& operator<< std::ostream &  o,
const MatrixOp &  M
[inline]
 

Output operator for {MatrixOp} objects.

Definition at line 41 of file AbstractLinAlgPack_MatrixOpOut.hpp.

void AbstractLinAlgPack::apply_op EApplyBy  apply_by,
const RTOpPack::RTOp primary_op,
const size_t  num_multi_vecs,
const MultiVector *  multi_vecs[],
const size_t  num_targ_multi_vecs,
MultiVectorMutable *  targ_multi_vecs[],
RTOpPack::ReductTarget reduct_objs[] = NULL,
const index_type  primary_first_ele = 1,
const index_type  primary_sub_dim = 0,
const index_type  primary_global_offset = 0,
const index_type  secondary_first_ele = 1,
const index_type  secondary_sub_dim = 0
 

Apply a reduction/transformation operator column by column and return an array of the reduction objects.

ToDo: Finish documentation!

Definition at line 287 of file AbstractLinAlgPack_MultiVector.cpp.

void AbstractLinAlgPack::apply_op EApplyBy  apply_by,
const RTOpPack::RTOp primary_op,
const RTOpPack::RTOp secondary_op,
const size_t  num_multi_vecs,
const MultiVector *  multi_vecs[],
const size_t  num_targ_multi_vecs,
MultiVectorMutable *  targ_multi_vecs[],
RTOpPack::ReductTarget reduct_obj,
const index_type  primary_first_ele = 1,
const index_type  primary_sub_dim = 0,
const index_type  primary_global_offset = 0,
const index_type  secondary_first_ele = 1,
const index_type  secondary_sub_dim = 0
 

Apply a reduction/transformation operator column by column and reduce the intermediate reduction objects into one reduction object.

ToDo: Finish documentation!

Definition at line 318 of file AbstractLinAlgPack_MultiVector.cpp.

std::ostream& operator<< std::ostream &  o,
const Permutation &  P
[inline]
 

Output operator for Permutation objects.

Definition at line 41 of file AbstractLinAlgPack_PermutationOut.hpp.

template<class T_Element>
SparseVectorSlice< T_Element > AbstractLinAlgPack::create_slice const SparseVectorUtilityPack::SpVecIndexLookup< T_Element > &  index_lookup,
size_type  size,
Range1D  rng
 

Return a sparse vector slice.

Preconditions:

  • index_lookup.validate_state() is called
  • [rng.full_range() != true] rng.ubound() <= size (throw #std::out_of_range#)

Postconditions:

  • Fill them in latter

Definition at line 47 of file AbstractLinAlgPack_SparseVectorClassDef.hpp.

std::ostream & AbstractLinAlgPack::operator<< std::ostream &  os,
const SpVectorSlice svs
 

SpVectorSlice output stream operator.

Definition at line 36 of file AbstractLinAlgPack_SpVectorOut.cpp.

RTOpPack::SparseSubVector AbstractLinAlgPack::sub_vec_view const SpVectorSlice sv,
const Range1D rng = Range1D()
 

Create an RTOpPack::SparseSubVector view object from a SpVectorSlice object.

Definition at line 85 of file AbstractLinAlgPack_SpVectorView.cpp.

void AbstractLinAlgPack::apply_op const RTOpPack::RTOp op,
const size_t  num_vecs,
const Vector *  vecs[],
const size_t  num_targ_vecs,
VectorMutable *  targ_vecs[],
RTOpPack::ReductTarget reduct_obj,
const index_type  first_ele = 1,
const index_type  sub_dim = 0,
const index_type  global_offset = 0
 

Apply a reduction/transformation,operation over a set of vectors: op(op(v[0]...v[nv-1],z[0]...z[nz-1]),(*reduct_obj)) -> z[0]...z[nz-1],(*reduct_obj).

The logical vector passed to the op.apply_op(...) method is:


 v(k + global_offset) = this->get_ele(first_ele + k - 1)
 , for k = 1 ... sub_dim
 

where v represents any one of the input or input/output vectors. The situation where first_ele == 1 and global_offset > 1 corresponds to the case where the vectors represent consitituent vectors in a larger aggregrate vector. The situation where first_ele > 1 and global_offset == 0 is for when a sub-view of the vectors are being treated as full vectors. Other combinations of these arguments are also possible.

Preconditions:

  • [num_vecs > 0] vecs[k]->space().isCompatible(this->space()) == true , for k = 0...num_vecs-1 (throw VectorSpace::IncompatibleVectorSpaces)
  • [num_targ_vecs > 0] targ_vecs[k]->space().isCompatible(this->space()) == true , for k = 0...num_targ_vecs-1 (throw VectorSpace::IncompatibleVectorSpaces)
  • 1 <= first_ele <= this->dim() (throw std::out_of_range)
  • global_offset >= 0 (throw std::invalid_argument)
  • sub_dim - (first_ele - 1) <= this->dim() (throw std::length_error).

Parameters:
op [in] Reduction/transformation operator to apply over each sub-vector and assemble the intermediate targets into reduct_obj (if reduct_obj != NULL).
num_vecs [in] Number of nonmutable vectors in vecs[]. If vecs==NULL then this argument is ignored but should be set to zero.
vecs [in] Array (length num_vecs) of a set of pointers to nonmutable vectors to include in the operation. The order of these vectors is significant to op.
num_targ_vecs [in] Number of mutable vectors in targ_vecs[]. If targ_vecs==NULL then this argument is ignored but should be set to zero.
targ_vecs [in] Array (length num_targ_vecs) of a set of pointers to mutable vectors to include in the operation. The order of these vectors is significant to op. If targ_vecs==NULL then op is called with no mutable vectors.
reduct_obj [in/out] Target object of the reduction operation. This object must have been created by the op.reduct_obj_create_raw(&reduct_obj) function first. The reduction operation will be added to (*reduct_obj) if (*reduct_obj) has already been through a reduction. By allowing the info in (*reduct_obj) to be added to the reduction over all of these vectors, the reduction operation can be accumulated over a set of abstract vectors which can be useful for implementing composite vectors for instance. If op.get_reduct_type_num_entries(...) returns num_values == 0, num_indexes == 0 and num_chars == 0 then reduct_obj should be set to NULL and no reduction will be performed.
first_ele [in] (default = 1) The index of the first element in this to be included.
sub_dim [in] (default = 0) The number of elements in these vectors to include in the reduction/transformation operation. The value of sub_dim == 0 means to include all available elements.
global_offset [in] (default = 0) The offset applied to the included vector elements.

Definition at line 292 of file AbstractLinAlgPack_Vector.cpp.

void Vp_StMtV VectorMutable *  y,
value_type  alpha,
const GenPermMatrixSlice &  P,
BLAS_Cpp::Transp  P_trans,
const Vector &  x,
value_type  beta = 1.0
[inline]
 

y = alpha * op(P) * x + beta *y

Definition at line 277 of file AbstractLinAlgPack_VectorMutable.hpp.

std::ostream& operator<< std::ostream &  o,
const Vector &  v
[inline]
 

Output operator for {Vector} objects.

Definition at line 41 of file AbstractLinAlgPack_VectorOut.hpp.

bool AbstractLinAlgPack::assert_print_nan_inf const value_type val,
char  name[],
bool  throw_excpt,
std::ostream *  out
 

This function asserts if a value_type scalare is a NaN or Inf and optionally prints out these entires.

Parameters:
val [in] Value the check
name [in] Name of the scale variable for output purposes
throw_excpt [in] If true and is found to be a NaN or Inf then a NaNInfException excetion is thrown after any output.
out [in/out] If out==NULL then not output is produced. If out!=NULL and val is not NaN or Inf, then no output is produced. If out!=NULL and val is NaN or Inf then this will be printed before any execption is thrown.
Returns:
Returns true if val is not NaN or Inf. If val is NaN or Inf then false will be returned unless a excetion NaNInfException was thrown (throw_except==true).

Definition at line 57 of file AbstractLinAlgPack_assert_print_nan_inf.cpp.

bool AbstractLinAlgPack::assert_print_nan_inf const Vector &  v,
char  name[],
bool  throw_excpt,
std::ostream *  out
 

This function asserts if a vector has any NaN or inf entries and optionally prints out these entires.

Parameters:
v [in] Vector slice to check
name [in] Name of the vector for output purposes
throw_excpt [in] If true and an entry is found to be a NaN or Inf then a NaNInfException excetion is thrown after any output.
out [in/out] If out==NULL then not output is produced. If out!=NULL and none of the entries is NaN or Inf, then no output is produced. If out!=NULL then any entries that are NaN or Inf will be printed before any execption is thrown.
Returns:
Returns true none of the entries are NaN or Inf. If one of the entries is NaN or Inf then false will be returned unless an excetion was thrown (throw_except==true).

Definition at line 75 of file AbstractLinAlgPack_assert_print_nan_inf.cpp.

bool AbstractLinAlgPack::TestMatrixSymSecant const MatrixOp &  B,
const Vector &  s,
const Vector &  y,
value_type  warning_tol,
value_type  error_tol,
bool  print_all_warnings,
std::ostream *  out,
bool  trase = true
 

Checks the secant condition B*s = y.

Call this function after calling B.secant_update(s,y,...).

Returns true if the secant condition satsifies error_tol and false otherwise.

Parameters:
B [in] The matrix object we are testing.
s [in] First secant vector
y [in] Second secant vector
warning_tol [in] Any relative error above warning_tol will be noted and possibly printed.
error_tol [in] Any relative error above error_tol will cause the tests to stop and false to be returned.
print_all_warnings [in] If true then all relative errors greater than warning_tol will be printed.
out [in/out] Stream that output or error messages are sent to follow the tests.
trase [in] If trase==true then tests will be trased and if trase==false then only error messages will be output.

Definition at line 44 of file AbstractLinAlgPack_TestMatrixSymSecant.cpp.

bool AbstractLinAlgPack::BFGS_sTy_suff_p_d const Vector &  s,
const Vector &  y,
const value_type sTy = NULL,
std::ostream *  out = NULL,
const char  func_name[] = NULL
 

Check that s'*y is sufficiently positive and print the result if it is not.

Parameters:
s [in] DVector (size n): Secant update vector B*s=y.
y [in] DVector (size n): Secant update vector for B*s=y.
sTy [in] If sTy != NULL then *sTy must contain the value computed from dot(s,y). If sTy == NULL, then this value will be computed internally. This argument is included so that the same computation does not have to be performed more than once by the client and this function.
out [in/out] If out==NULL then no output will be printed if the condition fails. If out!=NULL and the function returns false then a small amount of output will be sent to *out.
func_name [in] The name of the function this is being called from. If the condition is not met then this name in included in the printout to *out. If func_name == NULL then this string will obviously not be printed.
Returns:
If s'*y >= sqrt(mach_epsilon) * ||s||2 * ||y||2 then this function will return true. Otherwise it will return false.

Definition at line 37 of file AbstractLinAlgPack_BFGS_helpers.cpp.

std::istream & AbstractLinAlgPack::operator>> std::istream &  istrm,
COOMatrix &  coom
[inline]
 

Inputstream stream operator for COOMatrix.

The format for the imput is:

#m n nz#\ #a1:i1:j1 a2:i2:j2 .... anz:inz:jnz#\

In the above format, each non-zero element is given as a three item pair: value of the non-zero element, row indice (1-based) of the non-zero element, and the column indice (1-based) of the non-zero element. There must be no spaces between the numbers and the \':\' charachter and there must be at least one whitespace character between elements.

Definition at line 54 of file AbstractLinAlgPack_COOMatrixIn.hpp.

std::ostream & AbstractLinAlgPack::operator<< std::ostream &  o,
const COOMatrix &  coom
[inline]
 

Output stream operator for COOMatrix.

Calls the function:

std::ostream& output(std::ostream& o, const COOMatrix& coom)

Definition at line 47 of file AbstractLinAlgPack_COOMatrixOut.hpp.

std::ostream & AbstractLinAlgPack::output std::ostream &  o,
const COOMatrix &  coom
 

Output stream function for COOMatrix.

The format for the output is:

#m n nz#\ #a1:i1:j1 a2:i2:j2 .... anz:inz:jnz#\

In the above format, each non-zero element is given as a three item pair: value of the non-zero element, row indice (1-based) of the non-zero element, and the column indice (1-based) of the non-zero element. There are no spaces between the numbers and the \':\' charachter and there is one whitespace character between elements. There is a new line character added after all of the elements have been output.

Definition at line 32 of file AbstractLinAlgPack_COOMatrixOutFunc.cpp.

template<class T_Indice, class T_Value>
COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value> trans COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  part  )  [inline]
 

Create a transposed view of a partition object.

Definition at line 882 of file AbstractLinAlgPack_COOMatrixPartitionedViewClassDecl.hpp.

template<class T_COOM>
size_type AbstractLinAlgPack::COOM_num_in_column const T_COOM &  m,
BLAS_Cpp::Transp  trans,
size_type  col_offset,
const IVector::value_type col_perm,
size_type num_in_col
 

Definition at line 37 of file AbstractLinAlgPack_COOMatrixTmplConvertToSparseCompressedColumnDef.hpp.

template<class T_COOM>
void AbstractLinAlgPack::COOM_insert_nonzeros const T_COOM &  m,
BLAS_Cpp::Transp  trans,
value_type  alpha,
size_type  row_offset,
size_type  col_offset,
const IVector::value_type row_perm,
const IVector::value_type col_perm,
size_type next_nz_in_col,
FortranTypes::f_dbl_prec D_val,
FortranTypes::f_int D_row_i
 

Definition at line 63 of file AbstractLinAlgPack_COOMatrixTmplConvertToSparseCompressedColumnDef.hpp.

template<class T_COOM>
value_type AbstractLinAlgPack::COOM_insert_scaled_nonzeros const T_COOM &  m,
BLAS_Cpp::Transp  trans,
value_type  scaled_max_ele,
size_type  row_offset,
size_type  col_offset,
const IVector::value_type row_perm,
const IVector::value_type col_perm,
size_type next_nz_in_col,
FortranTypes::f_dbl_prec D_val,
FortranTypes::f_int D_row_i
 

Definition at line 108 of file AbstractLinAlgPack_COOMatrixTmplConvertToSparseCompressedColumnDef.hpp.

template<class T_COOM>
std::ostream & AbstractLinAlgPack::output_COOM std::ostream &  os,
const T_COOM &  coom,
SparseLinAlgPackIO::fmtflags  extra_flags
 

COO matrix output stream function.

This is a functions that are used to output a templated COO matrix object to a char based output stream. The COOMatrixTemplateInterface specification is used.

The output format is diferent depending on whether the bits SparseLinAlgPackIO::ignore_dim_bit#, LinAlgPackIO::no_insert_newlines_bit# , and #SparseLinAlgPackIO::ignore_nz_bit# are set. The default output format is:

rows cols nz#\ # val1:i1:j1 val2:i2:j2 ... valnz:inz:jnz#\

Each of the elements (val:i:j) are are put into columns according to the width set in the output stream #os# and other formating commands when it is called. Even if the set width is 0 or less than the number of char's for the element a space ' ' will be inserted between them. The elements are formated according to the format in the stream #os#.

If #exta_flags & SparseLinAlgPackIO::ignore_dim_bit# == 0# then rows# and cols# will not be output.

If #exta_flags & SparseLinAlgPackIO::ignore_nz_bit# == 0# then nz# will not be output.

If #exta_flags & LinAlgPackIO::no_insert_newlines_bit == 0# then a newline charactor will not be inserted after the last element, otherwise (by default) it will be.

If coom.nz() == 0# then no elements will be output.

If any of the output operations fails then a #std::ios_base::failure# exception is thrown.

Definition at line 40 of file AbstractLinAlgPack_COOMatrixTmplOutFuncDef.hpp.

template<class T_Indice, class T_Value>
void Mp_StM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs,
BLAS_Cpp::Transp  trans_rhs
[inline]
 

gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 52 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2
[inline]
 

vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 72 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2,
value_type  beta
[inline]
 

vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 81 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DMatrixSlice gms_rhs2,
BLAS_Cpp::Transp  trans_rhs2
[inline]
 

gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM).

Definition at line 104 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const DMatrixSlice gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs2,
BLAS_Cpp::Transp  trans_rhs2
[inline]
 

gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM).

Definition at line 113 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value, class M2>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const M2 M2_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta
[inline]
 

gms_lhs = alpha * op(coom_rhs1) * op(M2_rhs2) + beta * gms_lhs (right).

Was part of LinAlgOpPack but had to be removed becasue of unexplained bug.

Definition at line 127 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class M1, class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const M1 M1_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  coom_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta
[inline]
 

gms_lhs = alpha * op(M1_rhs1) * op(coom_rhs2) + beta * gms_lhs (right).

Was part of LinAlgOpPack but had to be removed becasue of unexplained bug.

Definition at line 151 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Mp_StM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs,
BLAS_Cpp::Transp  trans_rhs
[inline]
 

gms_lhs += alpha * op(coom_rhs) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 189 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2
[inline]
 

vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 209 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2,
value_type  beta
[inline]
 

vs_lhs += alpha * op(coom_rhs1) * vs_rhs2 (BLAS xGEMV) (time = O(coom_rhs.nz()), space = O(1)).

Definition at line 218 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DMatrixSlice gms_rhs2,
BLAS_Cpp::Transp  trans_rhs2
[inline]
 

gms_lhs += alpha * op(coom_rhs1) * op(gms_rhs2) (right) (BLAS xGEMM).

Definition at line 241 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const DMatrixSlice gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs2,
BLAS_Cpp::Transp  trans_rhs2
[inline]
 

gms_lhs += alpha * op(gms_rhs1) * op(coom_rhs2) (left) (BLAS xGEMM).

Definition at line 250 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value, class M2>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const M2 M2_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta
[inline]
 

gms_lhs = alpha * op(coom_rhs1) * op(M2_rhs2) + beta * gms_lhs (right).

Was part of LinAlgOpPack but had to be removed becasue of unexplained bug.

Definition at line 264 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class M1, class T_Indice, class T_Value>
void Mp_StMtM DMatrixSlice gms_lhs,
value_type  alpha,
const M1 M1_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  coom_rhs2,
BLAS_Cpp::Transp  trans_rhs2,
value_type  beta
[inline]
 

gms_lhs = alpha * op(M1_rhs1) * op(coom_rhs2) + beta * gms_lhs (right).

Was part of LinAlgOpPack but had to be removed becasue of unexplained bug.

Definition at line 288 of file AbstractLinAlgPack_COOMPartitionOp.hpp.

template<class T_Indice, class T_Value>
std::ostream& operator<< std::ostream &  os,
const COOMatrixPartitionedViewUtilityPack::Partition< T_Indice, T_Value > &  part
[inline]
 

Partition<> output stream operator.

This operator function calls the function output_COOM(os,part,0).

Definition at line 43 of file AbstractLinAlgPack_COOMPartitionOut.hpp.

template<class T_Indice, class T_Value>
std::ostream& operator<< std::ostream &  os,
const COOMatrixPartitionedViewUtilityPack::TransposedPartition< T_Indice, T_Value > &  trans_part
[inline]
 

TransposedPartition<> output stream operator.

This operator function calls the function output_COOM(os,trans_part,0).

Definition at line 53 of file AbstractLinAlgPack_COOMPartitionOut.hpp.

template<class M_t, class V_t>
void dense_Vp_StPtMtV DVectorSlice y,
value_type  a,
const GenPermMatrixSlice &  P,
BLAS_Cpp::Transp  P_trans,
const M_t &  M,
BLAS_Cpp::Transp  M_trans,
const V_t &  x,
value_type  b
 

Implements y = b*y + a*op(P)*op(M)*x where it is assumed that generating rows of op(M) is cheap compared to computing op(M)*x.

This function is not ment to be used by clients directly but instead by #MatrixOp# subclasses that want to use it.

Definition at line 52 of file AbstractLinAlgPack_dense_Vp_StPtMtV.hpp.

template<class T_Matrix>
void AbstractLinAlgPack::assign DMatrix gm_lhs,
const T_Matrix &  gm_rhs,
BLAS_Cpp::Transp  trans_rhs
 

gm_lhs = T_M (templated matrix type T_M)

Definition at line 62 of file AbstractLinAlgPack_MatrixVectorTemplateOpDef.hpp.

template<class T_Matrix>
void AbstractLinAlgPack::assign DMatrixSlice gms_lhs,
const T_Matrix &  gm_rhs,
BLAS_Cpp::Transp  trans_rhs
 

gms_lhs = T_M (templated matrix type T_M)

Definition at line 72 of file AbstractLinAlgPack_MatrixVectorTemplateOpDef.hpp.

template<class T_Matrix>
void AbstractLinAlgPack::V_MtV DVector v_lhs,
const T_Matrix &  gm_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2
 

v_lhs = T_M * vs_lhs (templated matrix type T_M)

Definition at line 123 of file AbstractLinAlgPack_MatrixVectorTemplateOpDef.hpp.

template<class T_Matrix>
void AbstractLinAlgPack::V_MtV DVectorSlice v_lhs,
const T_Matrix &  gm_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const DVectorSlice vs_rhs2
 

vs_lhs = T_M * vs_lhs (templated matrix type T_M)

Definition at line 136 of file AbstractLinAlgPack_MatrixVectorTemplateOpDef.hpp.

void AbstractLinAlgPack::rank_2_chol_update const value_type  a,
DVectorSlice u,
const DVectorSlice v,
DVectorSlice w,
DMatrixSliceTriEle R,
BLAS_Cpp::Transp  R_trans
 

Update the cholesky factor of symmetric positive definite matrix for a rank-2 update.

This function updates and an upper or lower triangular cholesky factor in O(n^2) flops. The basic idea is that the original symmetric positive definite matrix


       B = op(R')*op(R)
 
is subjected to a rank-2 update. This rank-2 update to B must be expressed in the form

       B_new = J'*J

   where:
       J = (op(R) + a*u*v')
 
The basic approach is to introduce an othogonal matrix Q such that

       Q*(op(R) + a*u*v') -> op(R_new)
 
is triangular. In other words (with I = Q'*Q)

       B_new = (op(R') + a*v*u')*Q'*Q*(op(R) + a*u*v') = op(R_new')*op(R_new)
 
This algorithm is based on Algorithm A3.4.1a in Dennis and Schnabel. However, it has been extended in the sense that it handles upper and lower along with transposed and nontransposed factors. It does not touch any of the elements of R outside of the designated triangular region and returns the rotations used with no extra storage space needed. This is a much nicer function than any other one that I have seen in the public domain.

It is guarrenteed that after this function finishes that the diagonal of R_new will be positive.

Parameters:
a [in] Scalar for update (see above).
u [in/out] (size n ) On input, contaitns the update vector u (see above). On output, contains the rotations needed for the transformation Q1*u -> ||u||2 * e(last_i). (ToDo: Document this!).
v [in] (size n )Update vector (see above).
w [out] (size n-1) On output, contains stored rotations from BLAS_Cpp::rotg(...) used to transform the upper or lower Hessenberg itermediate factor R2 back to upper or lower triangular form. (ToDo: Document this!). If n == 1 then w can be NULL.
R [in/out] (size n x n) Upper or lower triangular factor. On input the diagonal must contain all positive elements on the diagonal. On output contains the updated factor with all positive diagonal elements.
R_trans [in] Determines if op(R) = R (no_trans) or op(R) = R' (trans)

Definition at line 36 of file AbstractLinAlgPack_rank_2_chol_update.cpp.

void AbstractLinAlgPack::imp_sparse_bnd_diff int  sign,
const SpVectorSlice sv,
BLAS_Cpp::Uplo  uplo,
const DVectorSlice v,
DVectorSlice r
 

Take the difference between a spare lower bound vector and a dense vector.

r = alpha * ( sv - v )

If sign > 0 then alpha = 1.0. If sign < 0 then alpha = -1.0.

If uplo == upper, then the nonstored elements in sv are +inf, and if uplo == lower then the nonstored elements are lower.

Definition at line 34 of file AbstractLinAlgPack_sparse_bounds_diff.cpp.

void AbstractLinAlgPack::read_coo_into_valarrays std::istream &  istrm,
size_type m,
size_type n,
size_type nz,
std::valarray< value_type > &  a,
std::valarray< indice_type > &  ivect,
std::valarray< indice_type > &  jvect
 

Read in a Coordinate Matrix from a C++ input stream and store it in valarrays.

The format for the imput is:

#m n nz#\ #a1:i1:j1 a2:i2:j2 .... anz:inz:jnz#\

In the above format, each non-zero element is given as a three item pair: value of the non-zero element, row indice (1-based) of the non-zero element, and the column indice (1-based) of the non-zero element. There must be no spaces between the numbers and the \':\' charachter and there must be at least one whitespace character between elements.

The vectors a#, ivect#, and jvect# are resized to nz#. If any problem is found in the input an InputException will be throw that will include a descriptive message about the error.

Parameters:
m number of rows of the sparse matrix
n number of columns of sparse matrix
nz number of non-zero elements of the sparse matrix
a vector holding the non-zero elements
ivect vector holding the row indices (1-based)
jvect vector holding the column indices (1-based)

Definition at line 45 of file AbstractLinAlgPack_SparseCOOReadMatrix.cpp.

template<class T_Indice, class T_Value>
std::ostream & AbstractLinAlgPack::operator<< std::ostream &  o,
const SparseElement< T_Indice, T_Value > &  ele
[inline]
 

Outputs a SparseElement<> object.

Output format is:

#ele.value():ele.indice()#\

Definition at line 52 of file AbstractLinAlgPack_SparseElementOut.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::dot_V_SV const DVectorSlice vs_rhs1,
const T_SpVec &  sv_rhs2
 

result = dot(vs_rhs1,sv_rhs2) (BLAS xDOT)

Definition at line 78 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::dot_SV_V const T_SpVec &  sv_rhs1,
const DVectorSlice vs_rhs2
 

result = dot(sv_rhs1,vs_rhs2) (BLAS xDOT)

Definition at line 89 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::norm_1_SV const T_SpVec &  sv_rhs  ) 
 

result = ||sv_rhs||1 (BLAS xASUM)

Definition at line 95 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::norm_2_SV const T_SpVec &  sv_rhs  ) 
 

result = ||sv_rhs||2 (BLAS xNRM2)

Definition at line 104 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::norm_inf_SV const T_SpVec &  sv_rhs  ) 
 

result = ||sv_rhs||inf (BLAS IxAMAX)

Definition at line 113 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::max_SV const T_SpVec &  sv_rhs  ) 
 

result = max(sv_rhs)

Definition at line 122 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
value_type AbstractLinAlgPack::min_SV const T_SpVec &  sv_rhs  ) 
 

result = min(sv_rhs)

Definition at line 131 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
void AbstractLinAlgPack::Vt_S T_SpVec *  sv_lhs,
value_type  alpha
 

sv_lhs *= alpha (BLAS xSCAL)

Definition at line 140 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
void AbstractLinAlgPack::Vp_StSV DVectorSlice vs_lhs,
value_type  alpha,
const T_SpVec &  sv_rhs
 

vs_lhs += alpha * sv_rhs (BLAS xAXPY)

Definition at line 149 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
void AbstractLinAlgPack::Vp_StMtSV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSlice gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const T_SpVec &  sv_rhs2
 

vs_lhs += alpha * op(gms_rhs1) * sv_rhs2 (BLAS xGEMV)

Definition at line 159 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
void AbstractLinAlgPack::Vp_StMtSV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceTri tri_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const T_SpVec &  sv_rhs2
 

vs_lhs += alpha * op(tri_gms_rhs1) * sv_rhs2 (BLAS xTRMV)

Definition at line 186 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_SpVec>
void AbstractLinAlgPack::Vp_StMtSV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceSym sym_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const T_SpVec &  sv_rhs2
 

vs_lhs += alpha * op(sym_gms_rhs1) * sv_rhs2 (BLAS xSYMV)

Definition at line 275 of file AbstractLinAlgPack_SparseVectorOpDef.hpp.

template<class T_Ele>
value_type dot const DVectorSlice vs_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2
[inline]
 

begin Sparse BLAS operations result = dot(vs_rhs1,sv_rhs2) (BLAS xDOT)

Definition at line 67 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type dot const SparseVectorSlice< T_Ele > &  sv_rhs1,
const DVectorSlice vs_rhs2
[inline]
 

result = dot(sv_rhs1,vs_rhs2) (BLAS xDOT)

Definition at line 75 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type norm_1 const SparseVectorSlice< T_Ele > &  sv_rhs  )  [inline]
 

result = ||sv_rhs||1 (BLAS xASUM)

Definition at line 83 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type norm_2 const SparseVectorSlice< T_Ele > &  sv_rhs  )  [inline]
 

result = ||sv_rhs||2 (BLAS xNRM2)

Definition at line 91 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type norm_inf const SparseVectorSlice< T_Ele > &  sv_rhs  )  [inline]
 

result = ||sv_rhs||inf (BLAS IxAMAX)

Definition at line 99 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type max const SparseVectorSlice< T_Ele > &  sv_rhs  )  [inline]
 

result = max(sv_rhs)

Definition at line 107 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
value_type min const SparseVectorSlice< T_Ele > &  sv_rhs  )  [inline]
 

result = min(sv_rhs)

Definition at line 115 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StV DVectorSlice vs_lhs,
value_type  alpha,
const SparseVectorSlice< T_Ele > &  sv_rhs
[inline]
 

vs_lhs += alpha * sv_rhs (BLAS xAXPY)

Definition at line 123 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSlice gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2
[inline]
 

vs_lhs += alpha * op(gms_rhs1) * sv_rhs2 (BLAS xGEMV)

Definition at line 131 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceTri tri_gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2
[inline]
 

vs_lhs += alpha * op(tri_gms_rhs1) * sv_rhs2 (BLAS xTRMV)

Definition at line 140 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceSym sym_gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2
[inline]
 

vs_lhs += alpha * op(sym_gms_rhs1) * sv_rhs2 (BLAS xSYMV)

Definition at line 149 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class M, class T_Ele>
void Vp_StMtSVS DVectorSlice vs_lhs,
value_type  alpha,
const M M_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2,
value_type  beta
[inline]
 

vs_lhs = alpha * op(M_rhs1) * sv_rhs2 + beta * vs_lhs

Calls: #Vp_StMtSV(vs_lhs,alpha,M_rhs1,trans_rhs1,V_rhs2);#

Needed for LinAlgOpPack template functions and provides implementations for gms, tri, and sym matrices.

The name Vp_StMtV could not be used because of a conflict with another functions.

Definition at line 167 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSlice gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2,
value_type  beta
[inline]
 

vs_lhs = alpha * op(gms_rhs1) * sv_rhs2 + beta * vs_lhs

Definition at line 184 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceTri tri_gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2,
value_type  beta
[inline]
 

vs_lhs = alpha * op(tri_gms_rhs1) * sv_rhs2 + beta * vs_lhs

Definition at line 192 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

template<class T_Ele>
void Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const DMatrixSliceSym sym_gms_rhs1,
BLAS_Cpp::Transp  trans_rhs1,
const SparseVectorSlice< T_Ele > &  sv_rhs2,
value_type  beta
[inline]
 

vs_lhs = alpha * op(sym_gms_rhs1) * sv_rhs2 + beta * vs_lhs

Definition at line 200 of file AbstractLinAlgPack_SparseVectorSliceOp.hpp.

void AbstractLinAlgPack::add_elements SpVector sv_lhs,
value_type  alpha,
const DVectorSlice vs_rhs,
size_type  offset = 0,
bool  add_zeros = true
 

Add elements from a dense vector to a sparse vector.

Here sv_lhs is not resized and only elements are added. The purpose of this function is to add elements from a dense vector to a sparse vector.

Postconditions:{itemize} sv_lhs->nz() == vs_rhs->size() + sv_lhs_before->size() [sv_lhs_before->is_sorted() || sv_lhs_before->nz() == 0] sv_lhs->is_sorted() == true {itemize}

Definition at line 71 of file AbstractLinAlgPack_SpVectorOp.cpp.

void AbstractLinAlgPack::add_elements SpVector sv_lhs,
value_type  alpha,
const SpVectorSlice sv_rhs,
size_type  offset = 0,
bool  add_zeros = true
 

Add elements from a sparse vector to another sparse vector.

Here sv_lhs is not resized and only elements are added. The purpose of this function is to add elements from a sparse vector to a sparse vector.

Postconditions:{itemize} sv_lhs->nz() == sv_rhs->nz() + sv_lhs_before->size() [(sv_lhs_before->is_sorted() || sv_lhs_before->nz() == 0) && (sv_rhs.is_sorted() || sv_rhs.nz() == 0)] sv_lhs->is_sorted() == true {itemize}

Definition at line 90 of file AbstractLinAlgPack_SpVectorOp.cpp.

DenseLinAlgPack::DVectorSlice AbstractLinAlgPack::dense_view SpVectorSlice sv_rhs  )  [inline]
 

Create a dense representation of a sparse vector.

The primary use if the function is to create a DVectorSlice object that only represents the nonzero values of the sparse vector. This could have several different uses but one of the most significant examples is when you want to discard the indices when sv_rhs->size() == sv_rhs->nz() and sv_rhs->is_sorted() == true.

Definition at line 89 of file AbstractLinAlgPack_SpVectorOp.hpp.

const DenseLinAlgPack::DVectorSlice AbstractLinAlgPack::dense_view const SpVectorSlice sv_rhs  )  [inline]
 

Definition at line 98 of file AbstractLinAlgPack_SpVectorOp.hpp.

template<class Iter, class Cat, class Indice, class ValRef, class Diff>
TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff> operator+ Diff  n,
const TransSparseCOOElementViewIter< Iter, Cat, Indice, ValRef, Diff >  itr
[inline]
 

Definition at line 297 of file AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp.

void AbstractLinAlgPack::V_StMtV SpVector sv_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const DVectorSlice vs_rhs2
 

sv_lhs = alpha * op(P_rhs1) * vs_rhs2.

This function will resize the sparse vector lhs and only the resultant nonzero elements will be added.

If op(P_rhs1) is sorted by row (i.e. op(P_rhs1) = P_rhs1 sorted by row or op(P_rhs1) = P_rhs1' sorted by column) then sv_lhs->assume_sorted(true) is called and sv_lhs->is_sorted()==true on output.

This function will execute in O(P_rhs1.nz()) time.

Definition at line 38 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

void V_MtV SpVector sv_lhs,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const DVectorSlice vs_rhs2
[inline]
 

sv_lhs = op(P_rhs1) * vs_rhs2

Definition at line 61 of file AbstractLinAlgPack_GenPermMatrixSliceOp.hpp.

void AbstractLinAlgPack::V_StMtV SpVector sv_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const SpVectorSlice sv_rhs2
 

sv_lhs = alpha * op(P_rhs1) * sv_rhs2.

This function will resize the sparse vector lhs and add only the nonzero elements in the rhs.

If op(P_rhs1) is sorted by row (i.e. op(P_rhs1) = P_rhs1 sorted by row or op(P_rhs1) = P_rhs1' sorted by column) then sv_lhs->assume_sorted(true) is called.

Let's assume that op(P_rhs1) is not sorted by column and sv_rhs2 is sorted. In this case a linear search will have to be performed to match up elements. P_rhs1 will be iterated through sequentially and the corresponding nonzero element in sv_rhs2 searched for (binary search). Therefore, the runtime in this case will be:


    O( P_rhs1.nz() * log(sv_rhs2.nz()) )
 
If P_rhs1 and sv_rhs2 are unsorted, then the runtime will be:
 
    O( P_rhs1.nz() * sv_rhs2.nz() )
 
If op(P_rhs1) is sorted by column and sv_rhs2 is also sorted then the runtime will be:

    O( max( P_rhs1.nz(), sv_rhs2.nz() ) )
 
Of course if op(P_rhs1) is not sorted by row then the output vector will not be assumed sorted.

Definition at line 88 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

void V_MtV SpVector sv_lhs,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const SpVectorSlice sv_rhs2
[inline]
 

sv_lhs = op(P_rhs1) * sv_rhs2

Definition at line 108 of file AbstractLinAlgPack_GenPermMatrixSliceOp.hpp.

void AbstractLinAlgPack::Vp_StMtV SpVector sv_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const DVectorSlice vs_rhs2
 

sv_lhs += alpha * op(P_rhs1) * vs_rhs2.

This function will not resize the sparse vector lhs and will add new elements for the nonzero elements in the rhs. Therefore it is up to the client to ensure that there is sufficient storage for these elements. This function will not check to see if elements with duplicate indexes are added. It is up to the client to determine that. If sv_lhs is sorted on input and op(P_rhs1) is sorted by row, then sv_lhs->is_sorted() == true on output.

This function will execute in O(P_rhs1.nz()) time.

Definition at line 138 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

void Vp_MtV SpVector sv_lhs,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const DVectorSlice vs_rhs2
[inline]
 

sv_lhs += op(P_rhs1) * vs_rhs2.

Definition at line 137 of file AbstractLinAlgPack_GenPermMatrixSliceOp.hpp.

void AbstractLinAlgPack::Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const DVectorSlice vs_rhs2,
value_type  beta = 1.0
 

vs_lhs = alpha * op(P_rhs1) * vs_rhs2 + beta * vs_lhs

Definition at line 189 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

void AbstractLinAlgPack::Vp_StMtV DVectorSlice vs_lhs,
value_type  alpha,
const GenPermMatrixSlice &  P_rhs1,
BLAS_Cpp::Transp  P_rhs1_trans,
const SpVectorSlice sv_rhs2,
value_type  beta = 1.0
 

vs_lhs = alpha * op(P_rhs1) * sv_rhs2 + beta * vs_lhs

Definition at line 227 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

void AbstractLinAlgPack::intersection const GenPermMatrixSlice &  P1,
BLAS_Cpp::Transp  P1_trans,
const GenPermMatrixSlice &  P2,
BLAS_Cpp::Transp  P2_trans,
size_type Q_nz,
const size_type  Q_max_nz = 0,
size_type  Q_row_i[] = NULL,
size_type  Q_col_j[] = NULL,
GenPermMatrixSlice *  Q = NULL
 

Find the intersection between two GenPermMatrixSlice objects.

This subroutine has two modes. In the first mode (Q_max_nz == 0) it just computes the number of nonzero entries in the matrix:

Q = op(P1)*op(P1)

In the second mode (Q_max_nz > 0 && Q_row_i != NULL && Q_col_j != NULL) it also computes the row and column arrays for the resultant matrix Q. In addition if Q != NULL then a GenPermMatrixSlice object will be setup with as:

Q->initialize( op(P1).rows(), op(P2).cols(), Q_nz, 0, 0, Q_ordered_by, Q_row_i, Q_col_j, false )

Above Q_ordered_by will be determined of the fly.

This operation might require O(min(op(P1).cols(),op(P2).rows()) temporary storage but will always be executed in:

O(P1.nz()) + O(P2.nz()) + O(min(op(P1).cols(),op(P2).rows())

Parameters:
P1 [in] Right hand side permutation matrix.
P1_trans [in] If no_trans then op(P1) = P1 otherwise op(P1) = P1'.
P1 [in] Left hand side permutation matrix.
P1_trans [in] If no_trans then op(P2) = P2 otherwise op(P2) = P2'.
Q_nz [out] On return will contain the number of nonzeros in the resultant matrix Q
Q_max_nz [in] If Q_max_nz > 0 then the resultant row Q_row_i and column Q_col_j indices will be set. If it turns out that Q_nz will be larger than Q_max_nz then the exception std::length_error will be thrown and Q_row_i and Q_col_j may be left in an inconsistent state. If Q_max_nz == 0 then the rest of the return arguments are ignored and the resultant matrix will not be returned.
Q_row_i [out] Array (length Q_max_nz): If Q_max_nz > 0 then out return Q_row_i[k], k=0,,,Q_nz-1 will contain the row indices for the resultant matrix Q. If Q_max_nz == 0 then Q_row_i can be NULL.
Q_row_i [out] Array (length Q_max_nz): If Q_max_nz > 0 then out return Q_col_j[k], k=0,,,Q_nz-1 will contain the column indices for the resultant matrix Q. If Q_max_nz == 0 then Qd_col_j can be NULL.
Q [out] If Q_max_nz > 0 && Q != NULL then Q will be initialized as described above. It is allowed for Q == NULL.

Definition at line 327 of file AbstractLinAlgPack_GenPermMatrixSliceOp.cpp.

int AbstractLinAlgPack::exampleNLPDiagSetup int  argc,
char *  argv[],
MPI_Comm  comm,
Teuchos::RefCountPtr< const VectorSpace > *  vec_space,
size_type n,
value_type xo,
bool *  has_bounds,
bool *  dep_bounded
 

Create a vector space given the input arguments argc, argv[] and an MPI communicator.

Definition at line 31 of file AbstractLinAlgPack_exampleNLPDiagSetup.cpp.

void AbstractLinAlgPack::get_thyra_vector const VectorSpaceThyra &  thyra_vec_spc,
const Vector &  vec,
Teuchos::RefCountPtr< const Thyra::VectorBase< value_type > > *  thyra_vec
 

Definition at line 8 of file AbstractLinAlgPack_ThyraAccessors.cpp.

void AbstractLinAlgPack::free_thyra_vector const VectorSpaceThyra &  thyra_vec_spc,
const Vector &  vec,
Teuchos::RefCountPtr< const Thyra::VectorBase< value_type > > *  thyra_vec
 

Definition at line 52 of file AbstractLinAlgPack_ThyraAccessors.cpp.

void AbstractLinAlgPack::get_thyra_vector const VectorSpaceThyra &  thyra_vec_spc,
VectorMutable *  vec,
Teuchos::RefCountPtr< Thyra::VectorBase< value_type > > *  thyra_vec
 

Definition at line 64 of file AbstractLinAlgPack_ThyraAccessors.cpp.

void AbstractLinAlgPack::commit_thyra_vector const VectorSpaceThyra &  thyra_vec_spc,
VectorMutable *  vec,
Teuchos::RefCountPtr< Thyra::VectorBase< value_type > > *  thyra_vec
 

Definition at line 108 of file AbstractLinAlgPack_ThyraAccessors.cpp.


Generated on Thu Sep 18 12:36:06 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1