Missing @Override

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1503290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2013-07-15 15:16:29 +00:00
parent 7bbb2559f5
commit 4f2f94cd04
21 changed files with 47 additions and 0 deletions

View File

@ -105,6 +105,7 @@ public class MixtureMultivariateRealDistribution<T extends MultivariateRealDistr
}
/** {@inheritDoc} */
@Override
public double[] sample() {
// Sampled values.
double[] vals = null;
@ -133,6 +134,7 @@ public class MixtureMultivariateRealDistribution<T extends MultivariateRealDistr
}
/** {@inheritDoc} */
@Override
public void reseedRandomGenerator(long seed) {
// Seed needs to be propagated to underlying components
// in order to maintain consistency between runs.

View File

@ -202,6 +202,7 @@ public class MultivariateNormalDistribution
}
/** {@inheritDoc} */
@Override
public double[] sample() {
final int dim = getDimension();
final double[] normalVals = new double[dim];

View File

@ -179,6 +179,7 @@ public class DiagonalMatrix extends AbstractRealMatrix
* @throws DimensionMismatchException if
* {@code columnDimension(this) != rowDimension(m)}
*/
@Override
public RealMatrix multiply(final RealMatrix m)
throws DimensionMismatchException {
if (m instanceof DiagonalMatrix) {

View File

@ -83,6 +83,7 @@ public class RRQRDecomposition extends QRDecomposition {
/** Decompose matrix.
* @param qrt transposed matrix
*/
@Override
protected void decompose(double[][] qrt) {
p = new int[qrt.length];
for (int i = 0; i < p.length; i++) {
@ -95,6 +96,7 @@ public class RRQRDecomposition extends QRDecomposition {
* @param minor minor index
* @param qrt transposed matrix
*/
@Override
protected void performHouseholderReflection(int minor, double[][] qrt) {
double l2NormSquaredMax = 0;
@ -184,6 +186,7 @@ public class RRQRDecomposition extends QRDecomposition {
* Get a solver for finding the A &times; X = B solution in least square sense.
* @return a solver
*/
@Override
public DecompositionSolver getSolver() {
return new Solver(super.getSolver(), this.getP());
}

View File

@ -131,6 +131,7 @@ public class DBSCANClusterer<T extends Clusterable> extends Clusterer<T> {
* @return the list of clusters
* @throws NullArgumentException if the data points are null
*/
@Override
public List<Cluster<T>> cluster(final Collection<T> points) throws NullArgumentException {
// sanity checks

View File

@ -265,6 +265,7 @@ public class FuzzyKMeansClusterer<T extends Clusterable> extends Clusterer<T> {
* @throws MathIllegalArgumentException if the data points are null or the number
* of clusters is larger than the number of data points
*/
@Override
public List<CentroidCluster<T>> cluster(final Collection<T> dataPoints)
throws MathIllegalArgumentException {

View File

@ -193,6 +193,7 @@ public class KMeansPlusPlusClusterer<T extends Clusterable> extends Clusterer<T>
* @throws ConvergenceException if an empty cluster is encountered and the
* {@link #emptyStrategy} is set to {@code ERROR}
*/
@Override
public List<CentroidCluster<T>> cluster(final Collection<T> points)
throws MathIllegalArgumentException, ConvergenceException {

View File

@ -77,6 +77,7 @@ public class MultiKMeansPlusPlusClusterer<T extends Clusterable> extends Cluster
* underlying {@link KMeansPlusPlusClusterer} has its
* {@link KMeansPlusPlusClusterer.EmptyClusterStrategy} is set to {@code ERROR}.
*/
@Override
public List<CentroidCluster<T>> cluster(final Collection<T> points)
throws MathIllegalArgumentException, ConvergenceException {

View File

@ -36,6 +36,7 @@ public enum FilterType {
TRIGGER_ONLY_DECREASING_EVENTS {
/** {@inheritDoc} */
@Override
protected boolean getTriggeredIncreasing() {
return false;
}
@ -86,6 +87,7 @@ public enum FilterType {
* where s is a tiny positive value: {@link org.apache.commons.math3.util.Precision#SAFE_MIN}.
* </p>
*/
@Override
protected Transformer selectTransformer(final Transformer previous,
final double g, final boolean forward) {
if (forward) {
@ -212,6 +214,7 @@ public enum FilterType {
TRIGGER_ONLY_INCREASING_EVENTS {
/** {@inheritDoc} */
@Override
protected boolean getTriggeredIncreasing() {
return true;
}
@ -262,6 +265,7 @@ public enum FilterType {
* where s is a tiny positive value: {@link org.apache.commons.math3.util.Precision#SAFE_MIN}.
* </p>
*/
@Override
protected Transformer selectTransformer(final Transformer previous,
final double g, final boolean forward) {
if (forward) {

View File

@ -37,6 +37,7 @@ enum Transformer {
*/
UNINITIALIZED {
/** {@inheritDoc} */
@Override
protected double transformed(final double g) {
return 0;
}
@ -50,6 +51,7 @@ enum Transformer {
*/
PLUS {
/** {@inheritDoc} */
@Override
protected double transformed(final double g) {
return g;
}
@ -63,6 +65,7 @@ enum Transformer {
*/
MINUS {
/** {@inheritDoc} */
@Override
protected double transformed(final double g) {
return -g;
}
@ -76,6 +79,7 @@ enum Transformer {
*/
MIN {
/** {@inheritDoc} */
@Override
protected double transformed(final double g) {
return FastMath.min(-Precision.SAFE_MIN, FastMath.min(-g, +g));
}
@ -89,6 +93,7 @@ enum Transformer {
*/
MAX {
/** {@inheritDoc} */
@Override
protected double transformed(final double g) {
return FastMath.max(+Precision.SAFE_MIN, FastMath.max(-g, +g));
}

View File

@ -80,6 +80,7 @@ public abstract class MultivariateVectorOptimizer
* @throws DimensionMismatchException if the initial guess, target, and weight
* arguments have inconsistent dimensions.
*/
@Override
public PointVectorValuePair optimize(OptimizationData... optData)
throws TooManyEvaluationsException,
DimensionMismatchException {

View File

@ -64,6 +64,7 @@ public abstract class UnivariateOptimizer
* @throws TooManyEvaluationsException if the maximal number of
* evaluations is exceeded.
*/
@Override
public UnivariatePointValuePair optimize(OptimizationData... optData)
throws TooManyEvaluationsException {
// Perform computation.

View File

@ -594,6 +594,7 @@ public class EmpiricalDistribution extends AbstractRealDistribution {
* {@inheritDoc}
* @since 3.1
*/
@Override
public double probability(double x) {
return 0;
}
@ -672,6 +673,7 @@ public class EmpiricalDistribution extends AbstractRealDistribution {
*
* @since 3.1
*/
@Override
public double inverseCumulativeProbability(final double p) throws OutOfRangeException {
if (p < 0.0 || p > 1.0) {
throw new OutOfRangeException(p, 0, 1);

View File

@ -36,6 +36,7 @@ import org.junit.Test;
*/
public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<DerivativeStructure> {
@Override
protected DerivativeStructure build(final double x) {
return new DerivativeStructure(2, 1, 0, x);
}
@ -610,6 +611,7 @@ public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<De
}
}
@Override
@Test
public void testExp() {
double[] epsilon = new double[] { 1.0e-16, 1.0e-16, 1.0e-16, 1.0e-16, 1.0e-16 };
@ -640,6 +642,7 @@ public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<De
}
}
@Override
@Test
public void testLog() {
double[] epsilon = new double[] { 1.0e-16, 1.0e-16, 3.0e-14, 7.0e-13, 3.0e-11 };
@ -827,6 +830,7 @@ public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<De
}
}
@Override
@Test
public void testAtan2() {
double[] epsilon = new double[] { 5.0e-16, 3.0e-15, 2.2e-14, 1.0e-12, 8.0e-11 };
@ -1043,6 +1047,7 @@ public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<De
}
}
@Override
@Test
public void testAbs() {
@ -1064,6 +1069,7 @@ public class DerivativeStructureTest extends ExtendedFieldElementAbstractTest<De
}
@Override
@Test
public void testSignum() {

View File

@ -27,6 +27,7 @@ import org.junit.Test;
public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
@Override
protected Dfp build(final double x) {
return field.newDfp(x);
}
@ -1230,6 +1231,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
Assert.assertEquals("toString #9", "0.00001234", field.newDfp("0.00001234").toString());
}
@Override
@Test
public void testRound()
{
@ -1349,6 +1351,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
field.setRoundingMode(DfpField.RoundingMode.ROUND_HALF_EVEN); // reset
}
@Override
@Test
public void testCeil()
{
@ -1357,6 +1360,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
DfpField.FLAG_INEXACT, "Ceil #1");
}
@Override
@Test
public void testFloor()
{
@ -1365,6 +1369,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
DfpField.FLAG_INEXACT, "Floor #1");
}
@Override
@Test
public void testRint()
{
@ -1503,6 +1508,7 @@ public class DfpTest extends ExtendedFieldElementAbstractTest<Dfp> {
0, "Remainder #3");
}
@Override
@Test
public void testSqrt()
{

View File

@ -38,16 +38,19 @@ public class LevyDistributionTest extends RealDistributionAbstractTest {
Assert.assertTrue(d.isSupportConnected());
}
@Override
public LevyDistribution makeDistribution() {
return new LevyDistribution(new Well19937a(0xc5a5506bbb17e57al), 1.2, 0.4);
}
@Override
public double[] makeCumulativeTestPoints() {
return new double[] {
1.2001, 1.21, 1.225, 1.25, 1.3, 1.9, 3.4, 5.6
};
}
@Override
public double[] makeCumulativeTestValues() {
// values computed with R and function plevy from rmutil package
return new double[] {
@ -56,6 +59,7 @@ public class LevyDistributionTest extends RealDistributionAbstractTest {
};
}
@Override
public double[] makeDensityTestValues() {
// values computed with R and function dlevy from rmutil package
return new double[] {

View File

@ -152,6 +152,7 @@ public class MultiStartMultivariateVectorOptimizerTest {
LinearProblem problem = new LinearProblem(new double[][] { { 2 } }, new double[] { 3 });
JacobianMultivariateVectorOptimizer underlyingOptimizer =
new GaussNewtonOptimizer(true, new SimpleVectorValueChecker(1e-6, 1e-6)) {
@Override
public PointVectorValuePair optimize(OptimizationData... optData) {
// filter out simple bounds, as they are not supported
// by the underlying optimizer, and we don't really care for this test

View File

@ -55,6 +55,7 @@ public final class EmpiricalDistributionTest extends RealDistributionAbstractTes
protected double[] dataArray = null;
protected final int n = 10000;
@Override
@Before
public void setUp() {
super.setUp();
@ -499,6 +500,7 @@ public final class EmpiricalDistributionTest extends RealDistributionAbstractTes
super(i);
}
// Use constant distribution equal to bin mean within bin
@Override
protected RealDistribution getKernel(SummaryStatistics bStats) {
return new ConstantDistribution(bStats.getMean());
}
@ -511,6 +513,7 @@ public final class EmpiricalDistributionTest extends RealDistributionAbstractTes
public UniformKernelEmpiricalDistribution(int i) {
super(i);
}
@Override
protected RealDistribution getKernel(SummaryStatistics bStats) {
return new UniformRealDistribution(randomData.getRandomGenerator(), bStats.getMin(), bStats.getMax(),
UniformRealDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);

View File

@ -247,6 +247,7 @@ public class ClusterAlgorithmComparison {
this.duration = duration;
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;

View File

@ -213,6 +213,7 @@ public class LowDiscrepancyGeneratorComparison {
this.points = points;
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;

View File

@ -38,6 +38,7 @@ public class Decimal64Test extends ExtendedFieldElementAbstractTest<Decimal64> {
public static final Decimal64 MINUS_ZERO = new Decimal64(-0.0);
@Override
protected Decimal64 build(final double x) {
return new Decimal64(x);
}