diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 09:54:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-05 11:31:50 +0200 |
commit | 0c5f51ebbcb7e22baa913e2012e3dcfcc6cf7897 (patch) | |
tree | 3d441110176e37c1a6ba2d15a3653d5023863075 /nlpsolver | |
parent | d26540bb05b0443e7988da34372c86f88cbf1f6c (diff) |
java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
Diffstat (limited to 'nlpsolver')
-rw-r--r-- | nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java | 9 | ||||
-rw-r--r-- | nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java | 24 |
2 files changed, 0 insertions, 33 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java index b494d462bb6d..ffe03200e4cb 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalFile.java @@ -62,15 +62,6 @@ public class GlobalFile { raFile.seek(raFile.length()); raFile.writeBytes(inStr); raFile.close(); - - -// String oldFileStr = getStringFromFile(fileStr); -// String newFileStr = inStr; -// if (oldFileStr != null) { -// newFileStr = oldFileStr+inStr; -// } -// saveStringToFile(newFileStr,fileStr); - } public static Object loadObjectFromFile(String fileName) throws Exception { diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java index 45204c44497d..47d03c1256bf 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/RandomGenerator.java @@ -31,7 +31,6 @@ public class RandomGenerator { * Example: for find [0,1,2] */ public static int intRangeRandom(int lowLimit,int upLimit){ -// int num = (int)Math.rint(doubleRangeRandom(lowLimit,upLimit)); int num = (int)Math.floor(doubleRangeRandom(lowLimit,upLimit+1)-1E-10); return(num); } @@ -75,29 +74,6 @@ public static double doubleRangeRandom(double lowLimit,double upLimit){ return randomSelection(totalIndices, times); } -// public static int[] randomSelection(boolean[] types, int times) { -// int realTimes = times; -// if(realTimes>types.length) realTimes = types.length; -// boolean[] internalTypes = (boolean[])types.clone(); -// int upper = types.length-1; -// int[] indices = new int[realTimes]; -// if(realTimes==types.length) { -// for(int i=0; i<indices.length; i++) { -// indices[i] = i; -// } -// return indices; -// } -// int i = 0; -// while(i<realTimes) { -// indices[i] = intRangeRandom(0, upper); -// if(!internalTypes[indices[i]]) { -// internalTypes[indices[i]] = true; -// i++; -// } -// } -// return indices; -// } - public static int[] randomSelection(int low, int up, int times){ int[] totalIndices = new int[up-low]; for (int i=low; i<up; i++) { |