Missing @Override

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1197464 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-11-04 09:49:06 +00:00
parent 012c767987
commit 177eff33cb
19 changed files with 56 additions and 0 deletions

View File

@ -194,6 +194,7 @@ public class LegendreGaussIntegrator extends UnivariateRealIntegratorImpl {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected double doIntegrate() protected double doIntegrate()
throws TooManyEvaluationsException, MaxCountExceededException { throws TooManyEvaluationsException, MaxCountExceededException {

View File

@ -98,6 +98,7 @@ public class RombergIntegrator extends UnivariateRealIntegratorImpl {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected double doIntegrate() protected double doIntegrate()
throws TooManyEvaluationsException, MaxCountExceededException { throws TooManyEvaluationsException, MaxCountExceededException {

View File

@ -97,6 +97,7 @@ public class SimpsonIntegrator extends UnivariateRealIntegratorImpl {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected double doIntegrate() protected double doIntegrate()
throws TooManyEvaluationsException, MaxCountExceededException { throws TooManyEvaluationsException, MaxCountExceededException {

View File

@ -138,6 +138,7 @@ public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected double doIntegrate() protected double doIntegrate()
throws TooManyEvaluationsException, MaxCountExceededException { throws TooManyEvaluationsException, MaxCountExceededException {

View File

@ -273,6 +273,7 @@ public class PolynomialsUtils {
/** Get hash code. /** Get hash code.
* @return hash code * @return hash code
*/ */
@Override
public int hashCode() { public int hashCode() {
return (v << 16) ^ w; return (v << 16) ^ w;
} }
@ -281,6 +282,7 @@ public class PolynomialsUtils {
* @param key other key * @param key other key
* @return true if the instance and the other key refer to the same polynomial * @return true if the instance and the other key refer to the same polynomial
*/ */
@Override
public boolean equals(final Object key) { public boolean equals(final Object key) {
if ((key == null) || !(key instanceof JacobiKey)) { if ((key == null) || !(key instanceof JacobiKey)) {

View File

@ -126,6 +126,7 @@ public abstract class BaseSecantSolver
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected final double doSolve() { protected final double doSolve() {
// Get initial solution // Get initial solution
double x0 = getMin(); double x0 = getMin();

View File

@ -127,11 +127,13 @@ public class IntervalsSet extends AbstractRegion<Euclidean1D, Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public IntervalsSet buildNew(final BSPTree<Euclidean1D> tree) { public IntervalsSet buildNew(final BSPTree<Euclidean1D> tree) {
return new IntervalsSet(tree); return new IntervalsSet(tree);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected void computeGeometricalProperties() { protected void computeGeometricalProperties() {
if (getTree(false).getCut() == null) { if (getTree(false).getCut() == null) {
setBarycenter(Vector1D.NaN); setBarycenter(Vector1D.NaN);

View File

@ -40,23 +40,27 @@ public class SubOrientedPoint extends AbstractSubHyperplane<Euclidean1D, Euclide
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public double getSize() { public double getSize() {
return 0; return 0;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected AbstractSubHyperplane<Euclidean1D, Euclidean1D> buildNew(final Hyperplane<Euclidean1D> hyperplane, protected AbstractSubHyperplane<Euclidean1D, Euclidean1D> buildNew(final Hyperplane<Euclidean1D> hyperplane,
final Region<Euclidean1D> remainingRegion) { final Region<Euclidean1D> remainingRegion) {
return new SubOrientedPoint(hyperplane, remainingRegion); return new SubOrientedPoint(hyperplane, remainingRegion);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Side side(final Hyperplane<Euclidean1D> hyperplane) { public Side side(final Hyperplane<Euclidean1D> hyperplane) {
final double global = hyperplane.getOffset(((OrientedPoint) getHyperplane()).getLocation()); final double global = hyperplane.getOffset(((OrientedPoint) getHyperplane()).getLocation());
return (global < -1.0e-10) ? Side.MINUS : ((global > 1.0e-10) ? Side.PLUS : Side.HYPER); return (global < -1.0e-10) ? Side.MINUS : ((global > 1.0e-10) ? Side.PLUS : Side.HYPER);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public SplitSubHyperplane<Euclidean1D> split(final Hyperplane<Euclidean1D> hyperplane) { public SplitSubHyperplane<Euclidean1D> split(final Hyperplane<Euclidean1D> hyperplane) {
final double global = hyperplane.getOffset(((OrientedPoint) getHyperplane()).getLocation()); final double global = hyperplane.getOffset(((OrientedPoint) getHyperplane()).getLocation());
return (global < -1.0e-10) ? return (global < -1.0e-10) ?

View File

@ -100,6 +100,7 @@ public class Vector1DFormat extends VectorFormat<Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public StringBuffer format(final Vector<Euclidean1D> vector, final StringBuffer toAppendTo, public StringBuffer format(final Vector<Euclidean1D> vector, final StringBuffer toAppendTo,
final FieldPosition pos) { final FieldPosition pos) {
final Vector1D p1 = (Vector1D) vector; final Vector1D p1 = (Vector1D) vector;
@ -107,6 +108,7 @@ public class Vector1DFormat extends VectorFormat<Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Vector1D parse(final String source) { public Vector1D parse(final String source) {
ParsePosition parsePosition = new ParsePosition(0); ParsePosition parsePosition = new ParsePosition(0);
Vector1D result = parse(source, parsePosition); Vector1D result = parse(source, parsePosition);
@ -119,6 +121,7 @@ public class Vector1DFormat extends VectorFormat<Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Vector1D parse(final String source, final ParsePosition pos) { public Vector1D parse(final String source, final ParsePosition pos) {
final double[] coordinates = parseCoordinates(1, source, pos); final double[] coordinates = parseCoordinates(1, source, pos);
if (coordinates == null) { if (coordinates == null) {

View File

@ -105,11 +105,13 @@ public class PolyhedronsSet extends AbstractRegion<Euclidean3D, Euclidean2D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public PolyhedronsSet buildNew(final BSPTree<Euclidean3D> tree) { public PolyhedronsSet buildNew(final BSPTree<Euclidean3D> tree) {
return new PolyhedronsSet(tree); return new PolyhedronsSet(tree);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected void computeGeometricalProperties() { protected void computeGeometricalProperties() {
// compute the contribution of all boundary facets // compute the contribution of all boundary facets

View File

@ -43,12 +43,14 @@ public class SubPlane extends AbstractSubHyperplane<Euclidean3D, Euclidean2D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected AbstractSubHyperplane<Euclidean3D, Euclidean2D> buildNew(final Hyperplane<Euclidean3D> hyperplane, protected AbstractSubHyperplane<Euclidean3D, Euclidean2D> buildNew(final Hyperplane<Euclidean3D> hyperplane,
final Region<Euclidean2D> remainingRegion) { final Region<Euclidean2D> remainingRegion) {
return new SubPlane(hyperplane, remainingRegion); return new SubPlane(hyperplane, remainingRegion);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Side side(Hyperplane<Euclidean3D> hyperplane) { public Side side(Hyperplane<Euclidean3D> hyperplane) {
final Plane otherPlane = (Plane) hyperplane; final Plane otherPlane = (Plane) hyperplane;
@ -91,6 +93,7 @@ public class SubPlane extends AbstractSubHyperplane<Euclidean3D, Euclidean2D> {
* on the plus side of the instance and the part of the * on the plus side of the instance and the part of the
* instance on the minus side of the instance * instance on the minus side of the instance
*/ */
@Override
public SplitSubHyperplane<Euclidean3D> split(Hyperplane<Euclidean3D> hyperplane) { public SplitSubHyperplane<Euclidean3D> split(Hyperplane<Euclidean3D> hyperplane) {
final Plane otherPlane = (Plane) hyperplane; final Plane otherPlane = (Plane) hyperplane;

View File

@ -109,6 +109,7 @@ public class Vector3DFormat extends VectorFormat<Euclidean3D> {
* offsets of the alignment field * offsets of the alignment field
* @return the value passed in as toAppendTo. * @return the value passed in as toAppendTo.
*/ */
@Override
public StringBuffer format(final Vector<Euclidean3D> vector, final StringBuffer toAppendTo, public StringBuffer format(final Vector<Euclidean3D> vector, final StringBuffer toAppendTo,
final FieldPosition pos) { final FieldPosition pos) {
final Vector3D v3 = (Vector3D) vector; final Vector3D v3 = (Vector3D) vector;
@ -122,6 +123,7 @@ public class Vector3DFormat extends VectorFormat<Euclidean3D> {
* @throws MathParseException if the beginning of the specified string * @throws MathParseException if the beginning of the specified string
* cannot be parsed. * cannot be parsed.
*/ */
@Override
public Vector3D parse(final String source) { public Vector3D parse(final String source) {
ParsePosition parsePosition = new ParsePosition(0); ParsePosition parsePosition = new ParsePosition(0);
Vector3D result = parse(source, parsePosition); Vector3D result = parse(source, parsePosition);
@ -139,6 +141,7 @@ public class Vector3DFormat extends VectorFormat<Euclidean3D> {
* @param pos input/ouput parsing parameter. * @param pos input/ouput parsing parameter.
* @return the parsed {@link Vector3D} object. * @return the parsed {@link Vector3D} object.
*/ */
@Override
public Vector3D parse(final String source, final ParsePosition pos) { public Vector3D parse(final String source, final ParsePosition pos) {
final double[] coordinates = parseCoordinates(3, source, pos); final double[] coordinates = parseCoordinates(3, source, pos);
if (coordinates == null) { if (coordinates == null) {

View File

@ -120,11 +120,13 @@ public class PolygonsSet extends AbstractRegion<Euclidean2D, Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public PolygonsSet buildNew(final BSPTree<Euclidean2D> tree) { public PolygonsSet buildNew(final BSPTree<Euclidean2D> tree) {
return new PolygonsSet(tree); return new PolygonsSet(tree);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected void computeGeometricalProperties() { protected void computeGeometricalProperties() {
final Vector2D[][] v = getVertices(); final Vector2D[][] v = getVertices();

View File

@ -142,12 +142,14 @@ public class SubLine extends AbstractSubHyperplane<Euclidean2D, Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
protected AbstractSubHyperplane<Euclidean2D, Euclidean1D> buildNew(final Hyperplane<Euclidean2D> hyperplane, protected AbstractSubHyperplane<Euclidean2D, Euclidean1D> buildNew(final Hyperplane<Euclidean2D> hyperplane,
final Region<Euclidean1D> remainingRegion) { final Region<Euclidean1D> remainingRegion) {
return new SubLine(hyperplane, remainingRegion); return new SubLine(hyperplane, remainingRegion);
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Side side(final Hyperplane<Euclidean2D> hyperplane) { public Side side(final Hyperplane<Euclidean2D> hyperplane) {
final Line thisLine = (Line) getHyperplane(); final Line thisLine = (Line) getHyperplane();
@ -168,6 +170,7 @@ public class SubLine extends AbstractSubHyperplane<Euclidean2D, Euclidean1D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public SplitSubHyperplane<Euclidean2D> split(final Hyperplane<Euclidean2D> hyperplane) { public SplitSubHyperplane<Euclidean2D> split(final Hyperplane<Euclidean2D> hyperplane) {
final Line thisLine = (Line) getHyperplane(); final Line thisLine = (Line) getHyperplane();

View File

@ -103,6 +103,7 @@ public class Vector2DFormat extends VectorFormat<Euclidean2D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public StringBuffer format(final Vector<Euclidean2D> vector, final StringBuffer toAppendTo, public StringBuffer format(final Vector<Euclidean2D> vector, final StringBuffer toAppendTo,
final FieldPosition pos) { final FieldPosition pos) {
final Vector2D p2 = (Vector2D) vector; final Vector2D p2 = (Vector2D) vector;
@ -110,6 +111,7 @@ public class Vector2DFormat extends VectorFormat<Euclidean2D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Vector2D parse(final String source) { public Vector2D parse(final String source) {
ParsePosition parsePosition = new ParsePosition(0); ParsePosition parsePosition = new ParsePosition(0);
Vector2D result = parse(source, parsePosition); Vector2D result = parse(source, parsePosition);
@ -122,6 +124,7 @@ public class Vector2DFormat extends VectorFormat<Euclidean2D> {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public Vector2D parse(final String source, final ParsePosition pos) { public Vector2D parse(final String source, final ParsePosition pos) {
final double[] coordinates = parseCoordinates(2, source, pos); final double[] coordinates = parseCoordinates(2, source, pos);
if (coordinates == null) { if (coordinates == null) {

View File

@ -409,6 +409,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public ArrayRealVector ebeDivide(RealVector v) { public ArrayRealVector ebeDivide(RealVector v) {
if (v instanceof ArrayRealVector) { if (v instanceof ArrayRealVector) {
final double[] vData = ((ArrayRealVector) v).data; final double[] vData = ((ArrayRealVector) v).data;
@ -583,6 +584,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public RealVector projection(RealVector v) { public RealVector projection(RealVector v) {
return v.mapMultiply(dotProduct(v) / v.dotProduct(v)); return v.mapMultiply(dotProduct(v) / v.dotProduct(v));
} }
@ -615,16 +617,19 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public double getEntry(int index) { public double getEntry(int index) {
return data[index]; return data[index];
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public int getDimension() { public int getDimension() {
return data.length; return data.length;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public RealVector append(RealVector v) { public RealVector append(RealVector v) {
try { try {
return new ArrayRealVector(this, (ArrayRealVector) v); return new ArrayRealVector(this, (ArrayRealVector) v);
@ -644,6 +649,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public RealVector append(double in) { public RealVector append(double in) {
final double[] out = new double[data.length + 1]; final double[] out = new double[data.length + 1];
System.arraycopy(data, 0, out, 0, data.length); System.arraycopy(data, 0, out, 0, data.length);
@ -652,6 +658,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public RealVector getSubVector(int index, int n) { public RealVector getSubVector(int index, int n) {
ArrayRealVector out = new ArrayRealVector(n); ArrayRealVector out = new ArrayRealVector(n);
try { try {
@ -664,6 +671,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void setEntry(int index, double value) { public void setEntry(int index, double value) {
try { try {
data[index] = value; data[index] = value;
@ -673,6 +681,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void addToEntry(int index, double increment) { public void addToEntry(int index, double increment) {
data[index] += increment; data[index] += increment;
} }
@ -761,6 +770,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
* @return {@code true} if any coordinate of this vector is {@code NaN}, * @return {@code true} if any coordinate of this vector is {@code NaN},
* {@code false} otherwise. * {@code false} otherwise.
*/ */
@Override
public boolean isNaN() { public boolean isNaN() {
for (double v : data) { for (double v : data) {
if (Double.isNaN(v)) { if (Double.isNaN(v)) {
@ -777,6 +787,7 @@ public class ArrayRealVector extends RealVector implements Serializable {
* @return {@code true} if any coordinate of this vector is infinite and * @return {@code true} if any coordinate of this vector is infinite and
* none are {@code NaN}, {@code false} otherwise. * none are {@code NaN}, {@code false} otherwise.
*/ */
@Override
public boolean isInfinite() { public boolean isInfinite() {
if (isNaN()) { if (isNaN()) {
return false; return false;

View File

@ -273,6 +273,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public OpenMapRealVector append(RealVector v) { public OpenMapRealVector append(RealVector v) {
if (v instanceof OpenMapRealVector) { if (v instanceof OpenMapRealVector) {
return append((OpenMapRealVector) v); return append((OpenMapRealVector) v);
@ -286,6 +287,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public OpenMapRealVector append(double d) { public OpenMapRealVector append(double d) {
OpenMapRealVector res = new OpenMapRealVector(this, 1); OpenMapRealVector res = new OpenMapRealVector(this, 1);
res.setEntry(virtualSize, d); res.setEntry(virtualSize, d);
@ -334,6 +336,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public OpenMapRealVector ebeDivide(RealVector v) { public OpenMapRealVector ebeDivide(RealVector v) {
checkVectorDimensions(v.getDimension()); checkVectorDimensions(v.getDimension());
OpenMapRealVector res = new OpenMapRealVector(this); OpenMapRealVector res = new OpenMapRealVector(this);
@ -346,6 +349,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public OpenMapRealVector ebeMultiply(RealVector v) { public OpenMapRealVector ebeMultiply(RealVector v) {
checkVectorDimensions(v.getDimension()); checkVectorDimensions(v.getDimension());
OpenMapRealVector res = new OpenMapRealVector(this); OpenMapRealVector res = new OpenMapRealVector(this);
@ -358,6 +362,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public OpenMapRealVector getSubVector(int index, int n) { public OpenMapRealVector getSubVector(int index, int n) {
checkIndex(index); checkIndex(index);
checkIndex(index + n - 1); checkIndex(index + n - 1);
@ -375,6 +380,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public int getDimension() { public int getDimension() {
return virtualSize; return virtualSize;
} }
@ -421,6 +427,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public double getEntry(int index) { public double getEntry(int index) {
checkIndex(index); checkIndex(index);
return entries.get(index); return entries.get(index);
@ -507,6 +514,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public boolean isInfinite() { public boolean isInfinite() {
boolean infiniteFound = false; boolean infiniteFound = false;
Iterator iter = entries.iterator(); Iterator iter = entries.iterator();
@ -524,6 +532,7 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public boolean isNaN() { public boolean isNaN() {
Iterator iter = entries.iterator(); Iterator iter = entries.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
@ -551,12 +560,14 @@ public class OpenMapRealVector extends SparseRealVector
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public RealVector projection(RealVector v) { public RealVector projection(RealVector v) {
checkVectorDimensions(v.getDimension()); checkVectorDimensions(v.getDimension());
return v.mapMultiply(dotProduct(v) / v.dotProduct(v)); return v.mapMultiply(dotProduct(v) / v.dotProduct(v));
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void setEntry(int index, double value) { public void setEntry(int index, double value) {
checkIndex(index); checkIndex(index);
if (!isDefaultValue(value)) { if (!isDefaultValue(value)) {

View File

@ -339,6 +339,7 @@ public abstract class AdaptiveStepsizeIntegrator
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public abstract void integrate (ExpandableStatefulODE equations, double t) public abstract void integrate (ExpandableStatefulODE equations, double t)
throws MathIllegalStateException, MathIllegalArgumentException; throws MathIllegalStateException, MathIllegalArgumentException;

View File

@ -90,6 +90,7 @@ public abstract class RungeKuttaIntegrator extends AbstractIntegrator {
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override
public void integrate(final ExpandableStatefulODE equations, final double t) public void integrate(final ExpandableStatefulODE equations, final double t)
throws MathIllegalStateException, MathIllegalArgumentException { throws MathIllegalStateException, MathIllegalArgumentException {