42 double sd = VectorTools::sd<double, double>(rCoords);
43 auto constraint = std::make_shared<IntervalConstraint>(minCoord - sd, maxCoord + sd,
true,
true);
59 throw Exception(
"The number of axes kept by the MVA analysis was not set. You should initialize it with the setNbrOfAxes function");
60 vector<double> positions;
67 vector<double> tmpFreqs(20, 0.0);
68 vector<double> freqs(20, 0.0);
76 for (
unsigned int i = 0; i < 20; i++)
92 for (
size_t i = 0; i < 20; ++i)
104 for (
unsigned int i = 0; i < 20; i++)
108 tmpFreqs[i] = tmpFreqs[i] +
tPpalAxes_(j, i) * positions[j];
115 if (freqs.size() != tmpFreqs.size())
116 throw Exception(
"MvaFrequencySet::computeCoordsFirstSpaceCOA : error in the size of the vectors");
118 for (
unsigned int i = 0; i < tmpFreqs.size(); i++)
Basic implementation of the FrequencySet interface.
void setFrequencies_(const std::vector< double > &frequencies)
double & getFreq_(size_t i)
const Vdouble & getFrequencies() const override
void addParameter_(Parameter *parameter)
std::string getNamespace() const override
double getParameterValue(const std::string &name) const override
This class implements a state map where all resolved states are modeled.
This class is the core class inherited by the Coala class. COaLA is a branch-heterogeneous amino-acid...
const std::vector< double > & getColumnWeights() const
const RowMatrix< double > & getTppalAxesMatrix() const
size_t getNbrOfAxes() const
const RowMatrix< double > & getRowCoordinates() const
RowMatrix< double > tPpalAxes_
void setMatrixOfRowCoords(const RowMatrix< double > &matrix)
RowMatrix< double > rowCoords_
MvaFrequencySet(std::shared_ptr< const ProteicAlphabet > alpha)
Constructor.
void initSet(const CoalaCore &coala)
void computeReverseCOA(const std::vector< double > &positions, std::vector< double > &tmpFreqs)
std::vector< double > columnWeights_
void setFrequencies(const std::vector< double > &frequencies) override
Set the parameters in order to match a given set of frequencies.
void computeCoordsFirstSpaceCOA(std::vector< double > &tmpFreqs, std::vector< double > &freqs)
void fireParameterChanged(const ParameterList ¶meters) override
void setTransposeMatrixOfPpalAxes(const RowMatrix< double > &matrix)
std::map< std::string, std::string > paramValues_
void setNbrOfAxes(const size_t &nAxes)
void setVectorOfColumnWeights(const std::vector< double > &cw)
std::vector< double > col(size_t j) const
double toDouble(const std::string &s, char dec='.', char scientificNotation='e')
std::string toString(T t)
Defines the basic types of data flow nodes.