Skip to content

Commit

Permalink
Removes unnecessary variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudin47 committed Aug 23, 2023
1 parent 1601b02 commit eb0b8ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 8 additions & 2 deletions lib/src/Base/Func/LinearEvaluation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@ LinearEvaluation::LinearEvaluation(const Point & center,
, linear_(linear.transpose())
{
/* Check if the dimension of the constant term is compatible with the linear term */
if (constant.getDimension() != linear.getNbColumns()) throw InvalidDimensionException(HERE) << "Constant term dimension is incompatible with the linear term";
if (constant.getDimension() != linear.getNbColumns())
throw InvalidDimensionException(HERE) << "Constant term dimension is incompatible with the linear term. "
<<"The constant has dimension: " << constant.getDimension()
<<" but the number of columns in the linear matrix is: " << linear.getNbColumns();
/* Check if the dimension of the center term is compatible with the linear term */
if (center.getDimension() != linear.getNbRows()) throw InvalidDimensionException(HERE) << "Center term dimension is incompatible with the linear term";
if (center.getDimension() != linear.getNbRows())
throw InvalidDimensionException(HERE) << "Center term dimension is incompatible with the linear term. "
<< "The dimension of the center is: " << center.getDimension()
<< " but the number of rows of the linear matrix is: " << linear.getNbRows();
setInputDescription(Description::BuildDefault(getInputDimension(), "x"));
setOutputDescription(Description::BuildDefault(getOutputDimension(), "y"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ String LinearModelAnalysis::__str__(const String & offset) const
const Point tscores(getCoefficientsTScores());
const Point pValues(getCoefficientsPValues());
const Description names(linearModelResult_.getCoefficientsNames());
const Scalar sigma2 = linearModelResult_.getSampleResiduals().computeRawMoment(2)[0];
const SignedInteger dof = linearModelResult_.getDegreesOfFreedom();
const UnsignedInteger sampleSize = linearModelResult_.getSampleResiduals().getSize();
const String separator(" | ");
const String separatorEndLine(" |");
size_t twidth = 0; // column title max width
Expand Down

0 comments on commit eb0b8ef

Please sign in to comment.