本文整理汇总了Java中org.apache.commons.math.util.MathUtils.equals方法的典型用法代码示例。如果您正苦于以下问题:Java MathUtils.equals方法的具体用法?Java MathUtils.equals怎么用?Java MathUtils.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math.util.MathUtils
的用法示例。
在下文中一共展示了MathUtils.equals方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a
* <code>StatisticalSummaryValues</code> instance and all statistics have
* the same values as this.
*
* @param object the object to test equality against.
* @return true if object equals this
*/
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof StatisticalSummaryValues == false) {
return false;
}
StatisticalSummaryValues stat = (StatisticalSummaryValues) object;
return (MathUtils.equals(stat.getMax(), this.getMax()) &&
MathUtils.equals(stat.getMean(),this.getMean()) &&
MathUtils.equals(stat.getMin(),this.getMin()) &&
MathUtils.equals(stat.getN(), this.getN()) &&
MathUtils.equals(stat.getSum(), this.getSum()) &&
MathUtils.equals(stat.getVariance(),this.getVariance()));
}
示例2: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a <code>SummaryStatistics</code>
* instance and all statistics have the same values as this.
* @param object the object to test equality against.
* @return true if object equals this
*/
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof SummaryStatistics == false) {
return false;
}
SummaryStatistics stat = (SummaryStatistics) object;
return (MathUtils.equals(stat.getGeometricMean(),
this.getGeometricMean()) &&
MathUtils.equals(stat.getMax(), this.getMax()) &&
MathUtils.equals(stat.getMean(),this.getMean()) &&
MathUtils.equals(stat.getMin(),this.getMin()) &&
MathUtils.equals(stat.getN(), this.getN()) &&
MathUtils.equals(stat.getSum(), this.getSum()) &&
MathUtils.equals(stat.getSumsq(),this.getSumsq()) &&
MathUtils.equals(stat.getVariance(),this.getVariance()));
}
示例3: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a <code>SummaryStatistics</code>
* instance and all statistics have the same values as this.
* @param object the object to test equality against.
* @return true if object equals this
*/
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof MultivariateSummaryStatistics == false) {
return false;
}
MultivariateSummaryStatistics stat = (MultivariateSummaryStatistics) object;
return (MathUtils.equals(stat.getGeometricMean(),
this.getGeometricMean()) &&
MathUtils.equals(stat.getMax(), this.getMax()) &&
MathUtils.equals(stat.getMean(),this.getMean()) &&
MathUtils.equals(stat.getMin(),this.getMin()) &&
MathUtils.equals(stat.getN(), this.getN()) &&
MathUtils.equals(stat.getSum(), this.getSum()) &&
MathUtils.equals(stat.getSumSq(),this.getSumSq()) &&
MathUtils.equals(stat.getSumLog(),this.getSumLog()) &&
stat.getCovariance().equals(this.getCovariance()));
}
示例4: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a
* <code>StatisticalSummaryValues</code> instance and all statistics have
* the same values as this.
*
* @param object the object to test equality against.
* @return true if object equals this
*/
@Override
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof StatisticalSummaryValues == false) {
return false;
}
StatisticalSummaryValues stat = (StatisticalSummaryValues) object;
return MathUtils.equals(stat.getMax(), getMax()) &&
MathUtils.equals(stat.getMean(), getMean()) &&
MathUtils.equals(stat.getMin(), getMin()) &&
MathUtils.equals(stat.getN(), getN()) &&
MathUtils.equals(stat.getSum(), getSum()) &&
MathUtils.equals(stat.getVariance(), getVariance());
}
示例5: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a
* <code>SummaryStatistics</code> instance and all statistics have the
* same values as this.
* @param object the object to test equality against.
* @return true if object equals this
*/
@Override
public boolean equals(Object object) {
if (object == this) {
return true;
}
if (object instanceof SummaryStatistics == false) {
return false;
}
SummaryStatistics stat = (SummaryStatistics)object;
return MathUtils.equals(stat.getGeometricMean(), getGeometricMean()) &&
MathUtils.equals(stat.getMax(), getMax()) &&
MathUtils.equals(stat.getMean(), getMean()) &&
MathUtils.equals(stat.getMin(), getMin()) &&
MathUtils.equals(stat.getN(), getN()) &&
MathUtils.equals(stat.getSum(), getSum()) &&
MathUtils.equals(stat.getSumsq(), getSumsq()) &&
MathUtils.equals(stat.getVariance(), getVariance());
}
示例6: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a <code>SummaryStatistics</code>
* instance and all statistics have the same values as this.
* @param object the object to test equality against.
* @return true if object equals this
*/
@Override
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof MultivariateSummaryStatistics == false) {
return false;
}
MultivariateSummaryStatistics stat = (MultivariateSummaryStatistics) object;
return MathUtils.equals(stat.getGeometricMean(), getGeometricMean()) &&
MathUtils.equals(stat.getMax(), getMax()) &&
MathUtils.equals(stat.getMean(), getMean()) &&
MathUtils.equals(stat.getMin(), getMin()) &&
MathUtils.equals(stat.getN(), getN()) &&
MathUtils.equals(stat.getSum(), getSum()) &&
MathUtils.equals(stat.getSumSq(), getSumSq()) &&
MathUtils.equals(stat.getSumLog(), getSumLog()) &&
stat.getCovariance().equals( getCovariance());
}
示例7: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is a
* <code>SummaryStatistics</code> instance and all statistics have the
* same values as this.
* @param object the object to test equality against.
* @return true if object equals this
*/
@Override
public boolean equals(Object object) {
if (object == this) {
return true;
}
if (object instanceof SummaryStatistics == false) {
return false;
}
SummaryStatistics stat = (SummaryStatistics)object;
return (MathUtils.equals(stat.getGeometricMean(), this.getGeometricMean()) &&
MathUtils.equals(stat.getMax(), this.getMax()) &&
MathUtils.equals(stat.getMean(), this.getMean()) &&
MathUtils.equals(stat.getMin(), this.getMin()) &&
MathUtils.equals(stat.getN(), this.getN()) &&
MathUtils.equals(stat.getSum(), this.getSum()) &&
MathUtils.equals(stat.getSumsq(), this.getSumsq()) &&
MathUtils.equals(stat.getVariance(),
this.getVariance()));
}
示例8: solvePhase1
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Solves Phase 1 of the Simplex method.
* @param tableau simple tableau for the problem
* @exception OptimizationException if the maximal number of iterations is
* exceeded, or if the problem is found not to have a bounded solution, or
* if there is no feasible solution
*/
protected void solvePhase1(final SimplexTableau tableau) throws OptimizationException {
// make sure we're in Phase 1
if (tableau.getNumArtificialVariables() == 0) {
return;
}
while (!tableau.isOptimal()) {
doIteration(tableau);
}
// if W is not zero then we have no feasible solution
if (!MathUtils.equals(tableau.getEntry(0, tableau.getRhsOffset()), 0, epsilon)) {
throw new NoFeasibleSolutionException();
}
}
示例9: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is an
* <code>AbstractStorelessUnivariateStatistic</code> returning the same
* values as this for <code>getResult()</code> and <code>getN()</code>
* @param object object to test equality against.
* @return true if object returns the same value as this
*/
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof AbstractStorelessUnivariateStatistic == false) {
return false;
}
AbstractStorelessUnivariateStatistic stat = (AbstractStorelessUnivariateStatistic) object;
return (MathUtils.equals(stat.getResult(), this.getResult()) &&
MathUtils.equals(stat.getN(), this.getN()));
}
示例10: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is an
* <code>AbstractStorelessUnivariateStatistic</code> returning the same
* values as this for <code>getResult()</code> and <code>getN()</code>
* @param object object to test equality against.
* @return true if object returns the same value as this
*/
@Override
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof AbstractStorelessUnivariateStatistic == false) {
return false;
}
AbstractStorelessUnivariateStatistic stat = (AbstractStorelessUnivariateStatistic) object;
return MathUtils.equals(stat.getResult(), this.getResult()) &&
MathUtils.equals(stat.getN(), this.getN());
}
示例11: getBasicRow
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Checks whether the given column is basic.
* @param col index of the column to check
* @return the row that the variable is basic in. null if the column is not basic
*/
protected Integer getBasicRow(final int col) {
Integer row = null;
for (int i = 0; i < getHeight(); i++) {
if (MathUtils.equals(getEntry(i, col), 1.0, epsilon) && (row == null)) {
row = i;
} else if (!MathUtils.equals(getEntry(i, col), 0.0, epsilon)) {
return null;
}
}
return row;
}
示例12: equals
import org.apache.commons.math.util.MathUtils; //导入方法依赖的package包/类
/**
* Returns true iff <code>object</code> is an
* <code>AbstractStorelessUnivariateStatistic</code> returning the same
* values as this for <code>getResult()</code> and <code>getN()</code>
* @param object object to test equality against.
* @return true if object returns the same value as this
*/
@Override
public boolean equals(Object object) {
if (object == this ) {
return true;
}
if (object instanceof AbstractStorelessUnivariateStatistic == false) {
return false;
}
AbstractStorelessUnivariateStatistic stat = (AbstractStorelessUnivariateStatistic) object;
return (MathUtils.equals(stat.getResult(), this.getResult()) &&
MathUtils.equals(stat.getN(), this.getN()));
}