bpp-core3  3.0.0
bpp::Matrix< Scalar > Class Template Referenceabstract

The matrix template interface. More...

#include <Bpp/Numeric/Matrix/Matrix.h>

+ Inheritance diagram for bpp::Matrix< Scalar >:
+ Collaboration diagram for bpp::Matrix< Scalar >:

Public Member Functions

 Matrix ()
 
virtual ~Matrix ()
 
virtual const Scalar & operator() (size_t i, size_t j) const =0
 
virtual Scalar & operator() (size_t i, size_t j)=0
 
virtual bool equals (const Matrix &m, double threshold=NumConstants::TINY())
 
virtual size_t getNumberOfRows () const =0
 
virtual size_t getNumberOfColumns () const =0
 
virtual std::vector< Scalar > row (size_t i) const =0
 
virtual std::vector< Scalar > col (size_t j) const =0
 
virtual void resize (size_t nRows, size_t nCols)=0
 Resize the matrix. More...
 
virtual Clonableclone () const =0
 Create a copy of this object and send a pointer to it. More...
 

Detailed Description

template<class Scalar>
class bpp::Matrix< Scalar >

The matrix template interface.

Definition at line 22 of file Matrix.h.

Constructor & Destructor Documentation

◆ Matrix()

template<class Scalar>
bpp::Matrix< Scalar >::Matrix ( )
inline

Definition at line 26 of file Matrix.h.

◆ ~Matrix()

template<class Scalar>
virtual bpp::Matrix< Scalar >::~Matrix ( )
inlinevirtual

Definition at line 27 of file Matrix.h.

References bpp::Matrix< Scalar >::operator()().

Member Function Documentation

◆ clone()

virtual Clonable* bpp::Clonable::clone ( ) const
pure virtualinherited

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implemented in bpp::TestFunction, bpp::InfinityDerivableSecondOrderWrapper, bpp::InfinityDerivableFirstOrderWrapper, bpp::InfinityFunctionWrapper, bpp::LinearMatrix< Scalar >, bpp::AssociationGraphImplObserver< N, E, GraphImpl >, bpp::AssociationGraphImplObserver< N, E, DAGraphImpl >, bpp::AssociationGraphImplObserver< N, E, TreeGraphImpl >, bpp::StdErr, bpp::FunctionStopCondition, bpp::ColMatrix< Scalar >, bpp::PlaceboTransformedParameter, bpp::StdOut, bpp::GlobalGraph, bpp::ParametersStopCondition, bpp::StlOutputStreamWrapper, bpp::ReparametrizationDerivableSecondOrderWrapper, bpp::IntervalTransformedParameter, bpp::MetaOptimizer, bpp::IntervalConstraint, bpp::BppUnsignedInteger, bpp::StlOutputStream, bpp::SecondOrderDerivable, bpp::LogsumHmmLikelihood, bpp::RescaledHmmLikelihood, bpp::ReparametrizationDerivableFirstOrderWrapper, bpp::BppInteger, bpp::RowMatrix< Scalar >, bpp::RowMatrix< double >, bpp::RowMatrix< Real >, bpp::Parameter, bpp::Simplex, bpp::LowMemoryRescaledHmmLikelihood, bpp::Table< T >, bpp::AbstractNumericalDerivative, bpp::BppDouble, bpp::RTransformedParameter, bpp::NullOutputStream, bpp::ParametrizableCollection< N >, bpp::FirstOrderDerivable, bpp::OptimizerInterface, bpp::AssociationTreeGraphImplObserver< N, E, TreeGraphImpl >, bpp::AssociationDAGraphImplObserver< N, E, DAGraphImpl >, bpp::ThreePointsNumericalDerivative, bpp::DirichletDiscreteDistribution, bpp::SimpleDiscreteDistribution, bpp::DownhillSimplexMethod, bpp::Number< T >, bpp::Number< double >, bpp::Number< int >, bpp::Number< unsigned int >, bpp::FivePointsNumericalDerivative, bpp::ReparametrizationFunctionWrapper, bpp::DataTable, bpp::PrincipalComponentAnalysis, bpp::DualityDiagram, bpp::TruncatedExponentialDiscreteDistribution, bpp::MetaOptimizerInfos, bpp::BrentOneDimension, bpp::NewtonBacktrackOneDimension, bpp::FunctionOperator< F >, bpp::AutoParameter, bpp::GammaDiscreteDistribution, bpp::MixtureOfDiscreteDistributions, bpp::AliasParameterListener, bpp::Range< T >, bpp::PowellMultiDimensions, bpp::InvariantMixedDiscreteDistribution, bpp::TwoPointsNumericalDerivative, bpp::ParameterListener, bpp::OutputStream, bpp::GoldenSectionSearch, bpp::DirectionFunction, bpp::Point2D< T >, bpp::BetaDiscreteDistribution, bpp::ExponentialDiscreteDistribution, bpp::ParameterList, bpp::CorrespondenceAnalysis, bpp::HmmLikelihood, bpp::GaussianDiscreteDistribution, bpp::BfgsMultiDimensions, bpp::NewtonBacktrackOneDimension::NBODStopCondition, bpp::FullHmmTransitionMatrix, bpp::BppNotANumber, bpp::UniformDiscreteDistribution, bpp::ContingencyTableTest, bpp::Font, bpp::ConstantDistribution, bpp::DiscreteDistributionInterface, bpp::MultipleDiscreteDistribution, bpp::DownhillSimplexMethod::DSMStopCondition, bpp::MathOperator, bpp::BrentOneDimension::BODStopCondition, bpp::ConjugateGradientMultiDimensions, bpp::OptimizationStopCondition, bpp::AutoCorrelationTransitionMatrix, bpp::ParameterEvent, bpp::ComputationTree, bpp::GoldenSectionSearch::GSSStopCondition, bpp::PowellMultiDimensions::PMDStopCondition, bpp::ConstraintInterface, bpp::HmmStateAlphabet, bpp::RGBColor, bpp::SimpleMultiDimensions, bpp::SimpleNewtonMultiDimensions, bpp::HmmEmissionProbabilities, bpp::BinaryOperator, bpp::BppVector< T >, bpp::TransformedParameter, bpp::BppString, bpp::ConstantOperator, bpp::NegativeOperator, bpp::HmmTransitionMatrix, bpp::BppNumberI, bpp::BppBoolean, and bpp::NewtonOneDimension.

Referenced by bpp::FirstOrderDerivable::~FirstOrderDerivable(), and bpp::SecondOrderDerivable::~SecondOrderDerivable().

◆ col()

template<class Scalar>
virtual std::vector<Scalar> bpp::Matrix< Scalar >::col ( size_t  j) const
pure virtual
Returns
the column at position j as a vector.
Parameters
jThe index of the column.

Implemented in bpp::LinearMatrix< Scalar >, bpp::ColMatrix< Scalar >, bpp::RowMatrix< Scalar >, bpp::RowMatrix< double >, and bpp::RowMatrix< Real >.

Referenced by bpp::Matrix< Scalar >::equals().

◆ equals()

template<class Scalar>
virtual bool bpp::Matrix< Scalar >::equals ( const Matrix< Scalar > &  m,
double  threshold = NumConstants::TINY() 
)
inlinevirtual

◆ getNumberOfColumns()

template<class Scalar>
virtual size_t bpp::Matrix< Scalar >::getNumberOfColumns ( ) const
pure virtual
Returns
The number of columns.

Implemented in bpp::LinearMatrix< Scalar >, bpp::ColMatrix< Scalar >, bpp::RowMatrix< Scalar >, bpp::RowMatrix< double >, and bpp::RowMatrix< Real >.

Referenced by bpp::RowMatrix< Real >::addRow(), bpp::PrincipalComponentAnalysis::center(), bpp::DualityDiagram::check_(), bpp::ColMatrix< Scalar >::ColMatrix(), bpp::DualityDiagram::compute_(), bpp::CorrespondenceAnalysis::CorrespondenceAnalysis(), bpp::MatrixTools::covar(), bpp::MatrixTools::det(), bpp::MatrixTools::diag(), bpp::MatrixTools::directSum(), bpp::Matrix< Scalar >::equals(), bpp::MatrixTools::exp(), bpp::MatrixTools::fill(), bpp::MatrixTools::hadamardMult(), bpp::MatrixTools::inv(), bpp::MatrixTools::isSquare(), bpp::MatrixTools::kroneckerMult(), bpp::MatrixTools::lap(), bpp::MatrixTools::max(), bpp::MatrixTools::min(), bpp::MatrixTools::mult(), bpp::RowMatrix< Real >::operator=(), bpp::ColMatrix< Scalar >::operator=(), bpp::LinearMatrix< Scalar >::operator=(), bpp::operator==(), bpp::MatrixTools::pow(), bpp::PrincipalComponentAnalysis::PrincipalComponentAnalysis(), bpp::MatrixTools::print(), bpp::MatrixTools::printForR(), bpp::RowMatrix< Real >::row(), bpp::ColMatrix< Scalar >::row(), bpp::LinearMatrix< Scalar >::row(), bpp::RowMatrix< Real >::RowMatrix(), bpp::AdaptiveKernelDensityEstimation::sampleMean_(), bpp::PrincipalComponentAnalysis::scale(), bpp::MatrixTools::scale(), bpp::LUDecomposition< Real >::solve(), bpp::MatrixTools::sumElements(), bpp::MatrixTools::Taylor(), bpp::MatrixTools::toVVdouble(), bpp::MatrixTools::whichMax(), and bpp::MatrixTools::whichMin().

◆ getNumberOfRows()

template<class Scalar>
virtual size_t bpp::Matrix< Scalar >::getNumberOfRows ( ) const
pure virtual
Returns
The number of rows.

Implemented in bpp::LinearMatrix< Scalar >, bpp::ColMatrix< Scalar >, bpp::RowMatrix< Scalar >, bpp::RowMatrix< double >, and bpp::RowMatrix< Real >.

Referenced by bpp::ColMatrix< Scalar >::addCol(), bpp::PrincipalComponentAnalysis::center(), bpp::DualityDiagram::check_(), bpp::RowMatrix< Real >::col(), bpp::ColMatrix< Scalar >::col(), bpp::LinearMatrix< Scalar >::col(), bpp::ColMatrix< Scalar >::ColMatrix(), bpp::DualityDiagram::compute_(), bpp::CorrespondenceAnalysis::CorrespondenceAnalysis(), bpp::MatrixTools::covar(), bpp::MatrixTools::det(), bpp::MatrixTools::diag(), bpp::MatrixTools::directSum(), bpp::Matrix< Scalar >::equals(), bpp::MatrixTools::exp(), bpp::MatrixTools::fill(), bpp::MatrixTools::fillDiag(), bpp::MatrixTools::hadamardMult(), bpp::MatrixTools::inv(), bpp::MatrixTools::isSquare(), bpp::MatrixTools::kroneckerMult(), bpp::MatrixTools::lap(), bpp::MatrixTools::max(), bpp::MatrixTools::min(), bpp::MatrixTools::mult(), bpp::RowMatrix< Real >::operator=(), bpp::ColMatrix< Scalar >::operator=(), bpp::LinearMatrix< Scalar >::operator=(), bpp::operator==(), bpp::MatrixTools::pow(), bpp::PrincipalComponentAnalysis::PrincipalComponentAnalysis(), bpp::MatrixTools::print(), bpp::MatrixTools::printForR(), bpp::RowMatrix< Real >::RowMatrix(), bpp::AdaptiveKernelDensityEstimation::sampleMean_(), bpp::PrincipalComponentAnalysis::scale(), bpp::MatrixTools::scale(), bpp::FullHmmTransitionMatrix::setTransitionProbabilities(), bpp::LUDecomposition< Real >::solve(), bpp::MatrixTools::sumElements(), bpp::MatrixTools::Taylor(), bpp::MatrixTools::toVVdouble(), bpp::MatrixTools::whichMax(), and bpp::MatrixTools::whichMin().

◆ operator()() [1/2]

◆ operator()() [2/2]

template<class Scalar>
virtual Scalar& bpp::Matrix< Scalar >::operator() ( size_t  i,
size_t  j 
)
pure virtual

◆ resize()

◆ row()

template<class Scalar>
virtual std::vector<Scalar> bpp::Matrix< Scalar >::row ( size_t  i) const
pure virtual

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