diff --git a/base/standard/src/main/java/org/openscience/cdk/math/MathTools.java b/tool/structgen/src/main/java/org/openscience/cdk/structgen/MathTools.java similarity index 87% rename from base/standard/src/main/java/org/openscience/cdk/math/MathTools.java rename to tool/structgen/src/main/java/org/openscience/cdk/structgen/MathTools.java index 86dc81ecb1..d11484ccbf 100644 --- a/base/standard/src/main/java/org/openscience/cdk/math/MathTools.java +++ b/tool/structgen/src/main/java/org/openscience/cdk/structgen/MathTools.java @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -package org.openscience.cdk.math; +package org.openscience.cdk.structgen; /** @@ -25,7 +25,7 @@ * @cdk.module standard * @cdk.githash */ -public class MathTools { +class MathTools { /** * Analog of Math.max that returns the largest double value in an array of doubles. @@ -33,7 +33,7 @@ public class MathTools { * @param values the values to be searched for the largest value among them * @return the largest value among a set of given values */ - public static double max(double[] values) { + static double max(double[] values) { double max = values[0]; for (double value : values) if (value > max) max = value; @@ -46,7 +46,7 @@ public static double max(double[] values) { * @param values the values to be searched for the smallest value among them * @return the smallest value among a set of given values */ - public static double min(double[] values) { + static double min(double[] values) { double min = values[0]; for (double value : values) if (value < min) min = value; @@ -56,7 +56,7 @@ public static double min(double[] values) { /** * Analog of Math.max that returns the largest int value in an array of ints. **/ - public static int max(int[] values) { + static int max(int[] values) { int max = values[0]; for (int value : values) { if (value > max) { @@ -69,7 +69,7 @@ public static int max(int[] values) { /** * Analog of Math.max that returns the largest int value in an array of ints. **/ - public static int min(int[] values) { + static int min(int[] values) { int min = values[0]; for (int value : values) { if (value < min) { @@ -79,11 +79,11 @@ public static int min(int[] values) { return min; } - public static boolean isOdd(int intValue) { + static boolean isOdd(int intValue) { return !MathTools.isEven(intValue); } - public static boolean isEven(int intValue) { + static boolean isEven(int intValue) { return intValue % 2 == 0; } diff --git a/tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java b/tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java index 2442507a04..c564867ca8 100644 --- a/tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java +++ b/tool/structgen/src/main/java/org/openscience/cdk/structgen/RandomGenerator.java @@ -26,7 +26,6 @@ import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.interfaces.IBond; -import org.openscience.cdk.math.MathTools; import org.openscience.cdk.tools.ILoggingTool; import org.openscience.cdk.tools.LoggingToolFactory; import org.openscience.cdk.tools.manipulator.BondManipulator; diff --git a/tool/structgen/src/main/java/org/openscience/cdk/structgen/VicinitySampler.java b/tool/structgen/src/main/java/org/openscience/cdk/structgen/VicinitySampler.java index 3ddea8e27a..81735ad2d6 100644 --- a/tool/structgen/src/main/java/org/openscience/cdk/structgen/VicinitySampler.java +++ b/tool/structgen/src/main/java/org/openscience/cdk/structgen/VicinitySampler.java @@ -29,7 +29,6 @@ import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; import org.openscience.cdk.interfaces.IBond; -import org.openscience.cdk.math.MathTools; import org.openscience.cdk.tools.ILoggingTool; import org.openscience.cdk.tools.LoggingToolFactory; import org.openscience.cdk.tools.manipulator.BondManipulator; diff --git a/base/test-standard/src/test/java/org/openscience/cdk/math/MathToolsTest.java b/tool/structgen/src/test/java/org/openscience/cdk/structgen/MathToolsTest.java similarity index 96% rename from base/test-standard/src/test/java/org/openscience/cdk/math/MathToolsTest.java rename to tool/structgen/src/test/java/org/openscience/cdk/structgen/MathToolsTest.java index cb67fcde41..7fefafda0e 100644 --- a/base/test-standard/src/test/java/org/openscience/cdk/math/MathToolsTest.java +++ b/tool/structgen/src/test/java/org/openscience/cdk/structgen/MathToolsTest.java @@ -17,11 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * */ -package org.openscience.cdk.math; +package org.openscience.cdk.structgen; import org.junit.Assert; import org.junit.Test; -import org.openscience.cdk.math.MathTools; import org.openscience.cdk.CDKTestCase; /**