MATH-438
Removed deprecated methods. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1043075 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
34c5d96df7
commit
142d2c918a
|
@ -377,16 +377,6 @@ public abstract class AbstractRealVector implements RealVector {
|
|||
return mapToSelf(FunctionUtils.fix2ndArgument(new Divide(), d));
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public RealVector mapPow(double d) {
|
||||
return copy().mapPowToSelf(d);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public RealVector mapPowToSelf(double d){
|
||||
return mapToSelf(new Power(d));
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public RealMatrix outerProduct(RealVector v) {
|
||||
RealMatrix product;
|
||||
|
|
|
@ -246,33 +246,6 @@ public interface RealVector {
|
|||
*/
|
||||
RealVector mapDivideToSelf(double d);
|
||||
|
||||
/**
|
||||
* Map a power operation to each entry.
|
||||
*
|
||||
* @param d Operator value.
|
||||
* @return a mapped copy of the vector.
|
||||
* @deprecated in 2.2 (to be removed in 3.0). Please use
|
||||
* {@link #map(UnivariateRealFunction)} directly with
|
||||
* the function classes in package
|
||||
* {@link org.apache.commons.math.analysis.function}.
|
||||
*/
|
||||
@Deprecated
|
||||
RealVector mapPow(double d);
|
||||
|
||||
/**
|
||||
* Map a power operation to each entry.
|
||||
* The instance is changed in-place.
|
||||
*
|
||||
* @param d Operator value.
|
||||
* @return the mapped vector.
|
||||
* @deprecated in 2.2 (to be removed in 3.0). Please use
|
||||
* {@link #mapToSelf(UnivariateRealFunction)} directly with
|
||||
* the function classes in package
|
||||
* {@link org.apache.commons.math.analysis.function}.
|
||||
*/
|
||||
@Deprecated
|
||||
RealVector mapPowToSelf(double d);
|
||||
|
||||
/**
|
||||
* Element-by-element multiplication.
|
||||
* @param v vector by which instance elements must be multiplied
|
||||
|
|
|
@ -97,15 +97,6 @@ public class AbstractRealVectorTest {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealVector mapPowToSelf(double d) {
|
||||
for(int i=0; i<values.length; i++) {
|
||||
values[i] = FastMath.pow(values[i], d);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public RealVector ebeMultiply(RealVector v) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.apache.commons.math.analysis.function.Ceil;
|
|||
import org.apache.commons.math.analysis.function.Rint;
|
||||
import org.apache.commons.math.analysis.function.Signum;
|
||||
import org.apache.commons.math.analysis.function.Ulp;
|
||||
import org.apache.commons.math.analysis.function.Power;
|
||||
|
||||
/**
|
||||
* Test cases for the {@link ArrayRealVector} class.
|
||||
|
@ -182,14 +183,6 @@ public class ArrayRealVectorTest {
|
|||
throw unsupported();
|
||||
}
|
||||
|
||||
public RealVector mapPow(double d) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
||||
public RealVector mapPowToSelf(double d) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
||||
public RealVector ebeMultiply(RealVector v) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
@ -602,13 +595,13 @@ public class ArrayRealVectorTest {
|
|||
assertClose("compare vectors" ,result_mapDivideToSelf,v_mapDivideToSelf.getData(),normTolerance);
|
||||
|
||||
//octave = v1 .^ 2.0
|
||||
RealVector v_mapPow = v1.mapPow(2.0d);
|
||||
RealVector v_mapPow = v1.map(new Power(2));
|
||||
double[] result_mapPow = {1d, 4d, 9d};
|
||||
assertClose("compare vectors" ,result_mapPow,v_mapPow.getData(),normTolerance);
|
||||
|
||||
//octave = v1 .^ 2.0
|
||||
RealVector v_mapPowToSelf = v1.copy();
|
||||
v_mapPowToSelf.mapPowToSelf(2.0d);
|
||||
v_mapPowToSelf.mapToSelf(new Power(2));
|
||||
double[] result_mapPowToSelf = {1d, 4d, 9d};
|
||||
assertClose("compare vectors" ,result_mapPowToSelf,v_mapPowToSelf.getData(),normTolerance);
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.apache.commons.math.analysis.function.Ceil;
|
|||
import org.apache.commons.math.analysis.function.Rint;
|
||||
import org.apache.commons.math.analysis.function.Signum;
|
||||
import org.apache.commons.math.analysis.function.Ulp;
|
||||
import org.apache.commons.math.analysis.function.Power;
|
||||
|
||||
/**
|
||||
* Test cases for the {@link OpenMapRealVector} class.
|
||||
|
@ -171,16 +172,6 @@ public class SparseRealVectorTest {
|
|||
throw unsupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealVector mapPow(double d) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealVector mapPowToSelf(double d) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
||||
public RealVector ebeMultiply(RealVector v) {
|
||||
throw unsupported();
|
||||
}
|
||||
|
@ -531,13 +522,13 @@ public class SparseRealVectorTest {
|
|||
assertClose("compare vectors" ,result_mapDivideToSelf,v_mapDivideToSelf.getData(),normTolerance);
|
||||
|
||||
//octave = v1 .^ 2.0
|
||||
RealVector v_mapPow = v1.mapPow(2.0d);
|
||||
RealVector v_mapPow = v1.map(new Power(2));
|
||||
double[] result_mapPow = {1d, 4d, 9d};
|
||||
assertClose("compare vectors" ,result_mapPow,v_mapPow.getData(),normTolerance);
|
||||
|
||||
//octave = v1 .^ 2.0
|
||||
RealVector v_mapPowToSelf = v1.copy();
|
||||
v_mapPowToSelf.mapPowToSelf(2.0d);
|
||||
v_mapPowToSelf.mapToSelf(new Power(2));
|
||||
double[] result_mapPowToSelf = {1d, 4d, 9d};
|
||||
assertClose("compare vectors" ,result_mapPowToSelf,v_mapPowToSelf.getData(),normTolerance);
|
||||
|
||||
|
|
Loading…
Reference in New Issue