Merging mk branch changes from rev 185, minor cleanup.
This commit is contained in:
parent
29c655f874
commit
ee67276827
@ -115,6 +115,13 @@ public class FunctionArea extends DArea implements Serializable {
|
|||||||
drawCircle(c+""+val, position, graphID);
|
drawCircle(c+""+val, position, graphID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void drawCircle(String label, double xPos, double yPos, int graphID) {
|
||||||
|
double[] pos = new double[2];
|
||||||
|
pos[0]=xPos;
|
||||||
|
pos[1]=yPos;
|
||||||
|
drawCircle(label, pos, graphID);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plot a circle icon to the function area which is annotated with a char and
|
* Plot a circle icon to the function area which is annotated with a char and
|
||||||
* a double value. The color corresponds to the color of the graph with given ID
|
* a double value. The color corresponds to the color of the graph with given ID
|
||||||
|
@ -763,7 +763,12 @@ public abstract class AbstractEAIndividual implements IndividualInterface, java.
|
|||||||
// if (name.equalsIgnoreCase("Fitness")) return this.getFitness();
|
// if (name.equalsIgnoreCase("Fitness")) return this.getFitness();
|
||||||
// if (name.equalsIgnoreCase("FitnessArray")) return this.getFitness();
|
// if (name.equalsIgnoreCase("FitnessArray")) return this.getFitness();
|
||||||
Object data = m_dataHash.get(name);
|
Object data = m_dataHash.get(name);
|
||||||
if (data==null) System.err.println("Warning: data key " + name + " unknown!");
|
if (data==null) { // Fitness is actually in use... so lets have a minor special treatment
|
||||||
|
if (name.compareToIgnoreCase("Fitness")==0) data = getFitness();
|
||||||
|
else {
|
||||||
|
EVAERROR.errorMsgOnce("Warning: data key " + name + " unknown (pot. multiple errors)!");
|
||||||
|
}
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ package eva2.server.go.operators.selection.probability;
|
|||||||
import eva2.server.go.populations.Population;
|
import eva2.server.go.populations.Population;
|
||||||
|
|
||||||
/** The interface for methods with calculate the selection
|
/** The interface for methods with calculate the selection
|
||||||
* propability from the fitness values. While the fitness
|
* probability from the fitness values. While the fitness
|
||||||
* is typically to be minimized the selection probability
|
* is typically to be minimized the selection probability
|
||||||
* is within [0,1] summs up to one and is to be maximizes.
|
* is within [0,1] sums up to one and is to be maximizes.
|
||||||
* Created by IntelliJ IDEA.
|
* Created by IntelliJ IDEA.
|
||||||
* User: streiche
|
* User: streiche
|
||||||
* Date: 30.03.2004
|
* Date: 30.03.2004
|
||||||
@ -22,7 +22,7 @@ public interface InterfaceSelectionProbability {
|
|||||||
|
|
||||||
/** This method computes the selection probability for each individual
|
/** This method computes the selection probability for each individual
|
||||||
* in the population. Note: Summed over the complete population the selection
|
* in the population. Note: Summed over the complete population the selection
|
||||||
* probability sums up to one.
|
* probability gives one.
|
||||||
* @param population The population to compute.
|
* @param population The population to compute.
|
||||||
* @param input The name of the input.
|
* @param input The name of the input.
|
||||||
*/
|
*/
|
||||||
@ -30,7 +30,7 @@ public interface InterfaceSelectionProbability {
|
|||||||
|
|
||||||
/** This method computes the selection probability for each individual
|
/** This method computes the selection probability for each individual
|
||||||
* in the population. Note: Summed over the complete population the selection
|
* in the population. Note: Summed over the complete population the selection
|
||||||
* probability sums up to one.
|
* probability gives one.
|
||||||
* @param population The population to compute.
|
* @param population The population to compute.
|
||||||
* @param input The name of the input.
|
* @param input The name of the input.
|
||||||
*/
|
*/
|
||||||
|
@ -34,18 +34,17 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.LineNumberReader;
|
import java.io.LineNumberReader;
|
||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
import java.util.Vector;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipFile;
|
import java.util.zip.ZipFile;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
import wsi.ra.tool.DummyCategory;
|
import eva2.tools.ReflectPackage;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -324,6 +323,7 @@ public class BasicResourceLoader implements ResourceLoader
|
|||||||
// some f... special characters at the end which will not be shown
|
// some f... special characters at the end which will not be shown
|
||||||
// at the console output !!!
|
// at the console output !!!
|
||||||
resourceLocation = resourceLocation.trim();
|
resourceLocation = resourceLocation.trim();
|
||||||
|
InputStream in = null;
|
||||||
|
|
||||||
// is a relative path defined ?
|
// is a relative path defined ?
|
||||||
// this can only be possible, if this is a file resource location
|
// this can only be possible, if this is a file resource location
|
||||||
@ -333,30 +333,58 @@ public class BasicResourceLoader implements ResourceLoader
|
|||||||
((resourceLocation.length() > 1) &&
|
((resourceLocation.length() > 1) &&
|
||||||
(resourceLocation.charAt(1) == ':')))
|
(resourceLocation.charAt(1) == ':')))
|
||||||
{
|
{
|
||||||
return getStreamFromFile(resourceLocation);
|
in = getStreamFromFile(resourceLocation);
|
||||||
|
}
|
||||||
|
// InputStream inTest = getStreamFromFile(resourceLocation);
|
||||||
|
|
||||||
|
if (in == null) {
|
||||||
|
in = ClassLoader.getSystemResourceAsStream(resourceLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream in = ClassLoader.getSystemResourceAsStream(resourceLocation);
|
if (in == null) {
|
||||||
|
|
||||||
if (in == null)
|
|
||||||
{
|
|
||||||
// try again for web start applications
|
// try again for web start applications
|
||||||
in = this.getClass().getClassLoader().getResourceAsStream(
|
in = this.getClass().getClassLoader().getResourceAsStream(
|
||||||
resourceLocation);
|
resourceLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in == null)
|
if (in == null) {
|
||||||
{
|
// try to search other classpathes...? not really necessary.
|
||||||
return null;
|
// in = getStreamFromClassPath(resourceLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Stream opened for " + resourceLocation);
|
if (in == null) logger.debug("Unable to open stream for " + resourceLocation);
|
||||||
|
else logger.debug("Stream opened for " + resourceLocation);
|
||||||
}
|
}
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public InputStream getStreamFromClassPath(String resourceLocation) {
|
||||||
|
// String[] dynCP = ReflectPackage.getValidCPArray();
|
||||||
|
// Vector<String> found = new Vector<String>();
|
||||||
|
// for (int i=0; i<dynCP.length; i++) {
|
||||||
|
// System.out.println("reading element "+dynCP[i]);
|
||||||
|
// if (dynCP[i].endsWith(".jar")) {
|
||||||
|
// // those should be found somewhere else
|
||||||
|
//// getClassesFromJarFltr(set, dynCP[i], pckg, includeSubs, reqSuperCls);
|
||||||
|
// } else {
|
||||||
|
// String absRes = dynCP[i];
|
||||||
|
// if (!absRes.endsWith("/")) absRes += "/";
|
||||||
|
// absRes += resourceLocation;
|
||||||
|
// System.out.println("reading from files: "+dynCP[i]);
|
||||||
|
// InputStream in = getStreamFromFile(absRes);
|
||||||
|
// if (in != null) found.add(absRes);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (found.size() == 0) return null;
|
||||||
|
// if (found.size()>1) {
|
||||||
|
// System.err.println("Warning, more than one instance of " + resourceLocation + " were found, returning first of:");
|
||||||
|
// for (int i=0; i<found.size(); i++) System.err.println(found.get(i));
|
||||||
|
// }
|
||||||
|
// return getStreamFromFile(found.get(0));
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the byte data from a file at the given resource location.
|
* Gets the byte data from a file at the given resource location.
|
||||||
*
|
*
|
||||||
@ -487,7 +515,7 @@ public class BasicResourceLoader implements ResourceLoader
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
logger.error(e.getMessage());
|
if (logger.isDebugEnabled()) logger.error(e.getMessage());
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user