Further code cleanup

refs #2
- Removed old comments
- Fixed typos
- Removed unused code
This commit is contained in:
Fabian Becker 2014-10-21 22:47:29 +02:00
parent 857fd35977
commit c93b3ae0ff
66 changed files with 124 additions and 420 deletions

View File

@ -45,8 +45,6 @@ public class EvAInfo {
public static final String infoTitle = productName + " Information";
public static final String copyrightYear = "2010-2014";
////////////// Property handling...
private static Properties evaProperties;
static {
@ -102,8 +100,4 @@ public class EvAInfo {
public static String propDefaultModule() {
return getProperty("DefaultModule");
}
public static String propShowModules() {
return getProperty("ShowModules");
}
}

View File

@ -19,8 +19,6 @@ import java.util.logging.Logger;
/**
* Some miscellaneous functions to help with Beans, reflection, conversion and
* generic display.
*
* @author mkron, Holger Ulmer, Felix Streichert, Hannes Planatscher
*/
public class BeanInspector {
private static final Logger LOGGER = Logger.getLogger(BeanInspector.class.getName());
@ -164,13 +162,11 @@ public class BeanInspector {
}
int len = Array.getLength(obj);
for (int i = 0; i < len; i++) {
// sbuf.append(toString(Array.get(obj, i)));
if (withNewlines) {
sbuf.append('\n');
}
sbuf.append(toString(Array.get(obj, i), delim, tight, indentStr, indentDepth, withNewlines));
if (i < len - 1) {
// sbuf.append(delim);
if (!tight) {
sbuf.append(" ");
}
@ -216,7 +212,6 @@ public class BeanInspector {
for (int ii = 0; ii < methods.length; ii++) { // check if the object has its own toString method, in this case use it
if ((methods[ii].getName().equals("toString") /*|| (methods[ii].getName().equals("getStringRepresentation"))*/) && (methods[ii].getParameterTypes().length == 0)) {
Object[] args = new Object[0];
//args[0] = obj;
try {
String ret = (String) methods[ii].invoke(obj, args);
return makeIndent(indentStr, indentDepth) + ret;
@ -292,8 +287,6 @@ public class BeanInspector {
System.out.println("----");
System.out.println(BeanInspector.toString(new Population(), ';', false, ">", 1, false));
System.out.println(BeanInspector.toString(new GeneticAlgorithm(), ';', false, ">", 1, false));
// System.out.println(BeanInspector.toString(new Population(), ',', false, "\t"));
// System.out.println(BeanInspector.toString(new GeneticAlgorithm(), ',', false, "\t"));
}
/**
@ -308,7 +301,6 @@ public class BeanInspector {
public static Pair<String[], Object[]> getPublicPropertiesOf(Object target, boolean requireSetter, boolean showHidden) {
BeanInfo Info = null;
PropertyDescriptor[] Properties = null;
// MethodDescriptor[] Methods = null;
try {
Info = Introspector.getBeanInfo(target.getClass());
Properties = Info.getPropertyDescriptors();
@ -322,21 +314,15 @@ public class BeanInspector {
Object[] valArray = new Object[Properties.length];
for (int i = 0; i < Properties.length; i++) {
if ((Properties[i].isHidden() && !showHidden) || Properties[i].isExpert()) {
// System.err.println(Properties[i].getDisplayName() + " is " + ( (Properties[i].isExpert())? "expert": "hidden"));
continue;
}
String name = Properties[i].getDisplayName();
//System.out.println("name = "+name );
//Class type = Properties[i].getPropertyType();
//System.out.println("type = "+type.getName() );
Method getter = Properties[i].getReadMethod();
Method setter = Properties[i].getWriteMethod();
// Only display read/write properties.
if (getter == null || (setter == null && requireSetter)) {
continue;
}
//System.out.println("name = "+name );
//System.out.println("type = "+type.getName() );
Object args[] = {};
try {
@ -375,7 +361,6 @@ public class BeanInspector {
// then the properties
BeanInfo Info = null;
PropertyDescriptor[] Properties = null;
// MethodDescriptor[] Methods = null;
try {
Info = Introspector.getBeanInfo(obj.getClass());
Properties = Info.getPropertyDescriptors();
@ -390,17 +375,12 @@ public class BeanInspector {
continue;
}
String name = Properties[i].getDisplayName();
//System.out.println("name = "+name );
// Class type = Properties[i].getPropertyType();
//System.out.println("type = "+type.getName() );
Method getter = Properties[i].getReadMethod();
Method setter = Properties[i].getWriteMethod();
// Only display read/write properties.
if (getter == null || setter == null) {
continue;
}
//System.out.println("name = "+name );
//System.out.println("type = "+type.getName() );
Object args[] = {};
try {
Object value = getter.invoke(obj, args);
@ -753,11 +733,11 @@ public class BeanInspector {
if (val instanceof Integer) {
return ((Integer) val).doubleValue();
} else if (val instanceof Double) {
return ((Double) val).doubleValue();
return (Double) val;
} else if (val instanceof Boolean) {
return (((Boolean) val) ? 1. : 0.);
} else if (val instanceof Character) {
return ((Character) val).charValue();
return (Character) val;
} else if (val instanceof Byte) {
return ((Byte) val).doubleValue();
} else if (val instanceof Short) {
@ -816,21 +796,21 @@ public class BeanInspector {
return d;
}
if ((destType == Integer.class) || (destType == int.class)) {
return new Integer(d.intValue());
return d.intValue();
} else if ((destType == Boolean.class) || (destType == boolean.class)) {
return (d != 0) ? Boolean.TRUE : Boolean.FALSE;
} else if ((destType == Byte.class) || (destType == byte.class)) {
return new Byte(d.byteValue());
return d.byteValue();
} else if ((destType == Short.class) || (destType == short.class)) {
return new Short(d.shortValue());
return d.shortValue();
} else if ((destType == Long.class) || (destType == long.class)) {
return new Long(d.longValue());
return d.longValue();
} else if ((destType == Float.class) || (destType == float.class)) {
return new Float(d.floatValue());
return d.floatValue();
} else { // this makes hardly sense...
System.err.println("warning: converting from double to character or void...");
if ((destType == Character.class) || (destType == char.class)) {
return new Character(d.toString().charAt(0));
return d.toString().charAt(0);
} else {
return 0;
}
@ -891,7 +871,6 @@ public class BeanInspector {
* @return
*/
public static Object decodeType(Class<?> destType, Object value) {
// System.err.println("desttype: " + destType.toString() + ", val: " + value.getClass().toString());
if (destType.isAssignableFrom(value.getClass())) {
// value is already of destType or assignable (subclass), so just return it
return value;
@ -974,14 +953,10 @@ public class BeanInspector {
return false;
}
PropertyDescriptor[] properties = bi.getPropertyDescriptors();
// Method getter = null;
Method setter = null;
Class<?> type = null;
// System.err.println("looking at " + toString(obj));
for (int i = 0; i < properties.length; i++) {
if (properties[i].getDisplayName().equals(mem)) {
// System.err.println("looking at " + properties[i].getDisplayName());
// getter = properties[i].getReadMethod();
setter = properties[i].getWriteMethod();
type = properties[i].getPropertyType();
break;
@ -989,7 +964,6 @@ public class BeanInspector {
}
if (setter != null) {
try {
// System.out.println("setting value...");
Object[] args = new Object[]{decodeType(type, val)};
if (args[0] != null) {
setter.invoke(obj, args);

View File

@ -1,14 +1,4 @@
package eva2.gui;
/*
* Title: EvA2
* Description:
* Copyright: Copyright (c) 2003
* Company: University of Tuebingen, Computer Architecture
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
* @version: $Revision: 10 $
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
* $Author: streiche $
*/
import javax.swing.*;
import java.awt.*;

View File

@ -1,9 +1,4 @@
package eva2.gui;
/*
* Title: EvA2 Description: Copyright: Copyright (c) 2003 Company: University of Tuebingen, Computer
* Architecture @author Holger Ulmer, Felix Streichert, Hannes Planatscher @version: $Revision: 10 $
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $ $Author: streiche $
*/
import eva2.gui.editor.ComponentFilter;
@ -11,6 +6,7 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.beans.PropertyVetoException;
import java.util.Vector;
@ -55,32 +51,35 @@ public class JExtDesktopPane extends JDesktopPane {
}
};
windowMenu.add(actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, Event.CTRL_MASK)) {
actWindowTileVert = new ExtAction("Tile &Vertically", "Tiles all windows vertically",
KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, InputEvent.CTRL_MASK)) {
@Override
public void actionPerformed(final ActionEvent event) {
tileWindows(SwingConstants.HORIZONTAL);
}
});
};
windowMenu.add(actWindowTileVert);
windowMenu.add(actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically",
KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, Event.CTRL_MASK)) {
actWindowTileHorz = new ExtAction("Tile &Horizontally", "Tiles all windows horizontically",
KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, InputEvent.CTRL_MASK)) {
@Override
public void actionPerformed(final ActionEvent event) {
tileWindows(SwingConstants.VERTICAL);
}
});
};
windowMenu.add(actWindowTileHorz);
windowMenu.add(actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows",
KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK)) {
actWindowOverlap = new ExtAction("&Cascade Windows", "Cascades all visible windows",
KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_MASK)) {
@Override
public void actionPerformed(final ActionEvent event) {
overlapWindows();
}
});
};
windowMenu.add(actWindowOverlap);
windowMenu.addSeparator();
desktopManager.WINDOW_LIST_START = 4;
@ -232,7 +231,7 @@ public class JExtDesktopPane extends JDesktopPane {
} else {
f.setSelected(true);
}
} catch (PropertyVetoException exc) {
} catch (PropertyVetoException ignore) {
}
}
}
@ -240,18 +239,17 @@ public class JExtDesktopPane extends JDesktopPane {
@Override
public void addImpl(Component comp, Object constraints, int index) {
super.addImpl(comp, constraints, index);
//System.out.println("JExtDesktopPane.addImpl");
if (comp instanceof JInternalFrame) {
JInternalFrame docFrame = (JInternalFrame) comp;
int frameIndex = windowMenu.getItemCount() - desktopManager.WINDOW_LIST_START + 1;
if (docFrame.getClientProperty(ExtDesktopManager.INDEX) != null) {
return;
}
docFrame.putClientProperty(ExtDesktopManager.INDEX, new Integer(frameIndex));
docFrame.putClientProperty(ExtDesktopManager.INDEX, frameIndex);
JMenuItem m = new JMenuItem((frameIndex < 10 ? frameIndex + " " : "") + docFrame.getTitle());
if (frameIndex < 10) {
m.setMnemonic((char) (0x30 + frameIndex));
m.setAccelerator(KeyStroke.getKeyStroke(0x30 + frameIndex, Event.ALT_MASK));
m.setAccelerator(KeyStroke.getKeyStroke(0x30 + frameIndex, InputEvent.ALT_MASK));
}
m.setToolTipText("Shows the window " + docFrame.getTitle());
m.putClientProperty(ExtDesktopManager.FRAME, docFrame);

View File

@ -5,10 +5,7 @@ import eva2.optimization.tools.FileTools;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.text.AbstractDocument;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DocumentFilter;
import javax.swing.text.*;
import java.awt.*;
import java.awt.event.*;
import java.io.Serializable;

View File

@ -367,7 +367,7 @@ public class Main extends JFrame implements OptimizationStateListener {
createActions();
setSize(800, 600);
setSize(1024, 800);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((screenSize.width - this.getWidth()) / 2, (int) ((screenSize.height - this.getHeight()) / 2.5));
@ -533,8 +533,8 @@ public class Main extends JFrame implements OptimizationStateListener {
System.setProperty("com.apple.mrj.application.live-resize", "true");
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
LOGGER.log(Level.INFO, "Could not set Look&Feel", ex);
}
} else {
/* Set Look and Feel */

View File

@ -170,7 +170,7 @@ public class PropertySheetPanel extends JPanel implements PropertyChangeListener
propertyTable.setRowHeight(20);
propertyTable.setDragEnabled(false);
propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
propertyTable.setIntercellSpacing(new Dimension(8, 0));
//propertyTable.setIntercellSpacing(new Dimension(8, 0));
// Close any child windows at this point
removeAll();

View File

@ -93,12 +93,12 @@ public class AbstractEAIndividualComparator implements Comparator<Object>, Seria
*
* @param indyDataKey
* @param fitnessCriterion
* @param priorizeConstraints
* @param preferFeasible
* @see #AbstractEAIndividualComparator(int)
* @see #AbstractEAIndividualComparator(String)
*/
public AbstractEAIndividualComparator(String indDataKey, int fitnessCriterion, boolean preferFeasible) {
this.indyDataKey = indDataKey;
public AbstractEAIndividualComparator(String indyDataKey, int fitnessCriterion, boolean preferFeasible) {
this.indyDataKey = indyDataKey;
this.fitCriterion = fitnessCriterion;
this.preferFeasible = preferFeasible;
}

View File

@ -235,7 +235,7 @@ public class Processor extends Thread implements InterfaceProcessor, InterfacePo
this.optimizationParameters.getProblem().initializeProblem();
this.optimizationParameters.getOptimizer().setProblem(this.optimizationParameters.getProblem());
this.optimizationParameters.getTerminator().init(this.optimizationParameters.getProblem());
this.optimizationParameters.getTerminator().initialize(this.optimizationParameters.getProblem());
maybeInitParamCtrl(optimizationParameters);
if (this.createInitialPopulations) {
this.optimizationParameters.getOptimizer().initialize();

View File

@ -42,7 +42,7 @@ public class NoCrossover implements InterfaceCrossover, java.io.Serializable {
for (int i = 0; i < partners.size(); i++) {
result[i + 1] = (AbstractEAIndividual) ((AbstractEAIndividual) partners.get(i)).clone();
}
//in case the crossover was successfull lets give the mutation operators a chance to mate the strategy parameters
//in case the crossover was successful lets give the mutation operators a chance to mate the strategy parameters
for (int i = 0; i < result.length; i++) {
result[i].getMutationOperator().crossoverOnStrategyParameters(indy1, partners);
}

View File

@ -10,11 +10,6 @@ import eva2.optimization.strategies.InterfaceOptimizer;
* MOXMigration typically stands for multi-criterial migration.
* For multi-criterial optimization the migration scheme
* also may give the subdividing scheme.
* Created by IntelliJ IDEA.
* User: streiche
* Date: 15.09.2004
* Time: 14:45:15
* To change this template use File | Settings | File Templates.
*/
public interface InterfaceMigration {
@ -27,7 +22,7 @@ public interface InterfaceMigration {
* Typically i'll need some initialization method for
* every bit of code i write....
*/
public void initMigration(InterfaceOptimizer[] islands);
public void initializeMigration(InterfaceOptimizer[] islands);
/**
* The migrate method can be called asychnronously or

View File

@ -27,7 +27,7 @@ public class MOBestMigration implements InterfaceMigration, java.io.Serializable
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
// pff at a later stage i could initialize a topology here
}

View File

@ -65,7 +65,7 @@ public class MOClusteringSeparation implements InterfaceMigration, java.io.Seria
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
// pff at a later stage i could initialize a topology here
if (this.reuseC) {
this.kMeans.resetC();

View File

@ -61,7 +61,7 @@ public class MOConeSeparation implements InterfaceMigration, java.io.Serializabl
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
// pff at a later stage i could initialize a topology here
}

View File

@ -64,7 +64,7 @@ public class MOXMeansSeparation implements InterfaceMigration, java.io.Serializa
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
// pff at a later stage i could initialize a topology here
}

View File

@ -27,7 +27,7 @@ public class SOBestMigration implements InterfaceMigration, java.io.Serializable
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
// pff at a later stage i could initialize a topology here
}

View File

@ -20,7 +20,7 @@ public class SOMONoMigration implements InterfaceMigration, java.io.Serializable
* every bit of code i write....
*/
@Override
public void initMigration(InterfaceOptimizer[] islands) {
public void initializeMigration(InterfaceOptimizer[] islands) {
}

View File

@ -8,11 +8,6 @@ import eva2.optimization.population.Population;
* a single double values, thus allowing weight aggregation, goal programming and
* so on. To allow logging the original double[] values are stored in the userData
* using the key "MOFitness".
* Created by IntelliJ IDEA.
* User: streiche
* Date: 05.03.2004
* Time: 10:44:14
* To change this template use File | Settings | File Templates.
*/
public interface InterfaceMOSOConverter {
@ -43,11 +38,6 @@ public interface InterfaceMOSOConverter {
*/
public void setOutputDimension(int dim);
// /** This method allows the problem to set the names of the output variables
// * @param dim Output names
// */
// public void setOutputNames(String[] dim);
/**
* This method processes a single individual
*

View File

@ -683,7 +683,7 @@ public class PostProcess {
Pair<Integer, Boolean> stepsAbortedFlag = null;
for (int i = 0; i < candidates.size(); i++) { // improve each single sub pop
subPop = nmPops.get(i);
term.init(prob);
term.initialize(prob);
switch (method) {
case nelderMead:

View File

@ -12,11 +12,6 @@ import eva2.optimization.population.Population;
* not implemented. All selection method should obey Deb's constraint
* handling principle, first select feasible, only if all are infeasible
* select the individuals with the smallest constraint violation.
* Created by IntelliJ IDEA.
* User: streiche
* Date: 18.03.2003
* Time: 11:24:22
* To change this template use Options | File Templates.
*/
public interface InterfaceSelection {
@ -52,11 +47,11 @@ public interface InterfaceSelection {
* This method allows you to select >size< partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size);
/**
* Toggle the use of obeying the constraint violation principle

View File

@ -77,13 +77,13 @@ public class SelectAll implements InterfaceSelection, java.io.Serializable {
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -160,17 +160,15 @@ public class SelectBestIndividuals implements InterfaceSelection, java.io.Serial
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************
* These are for GUI
*/
/**
* This method returns a global info string
*

View File

@ -158,13 +158,13 @@ public class SelectEPTournaments implements InterfaceSelection, java.io.Serializ
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -105,13 +105,13 @@ public class SelectMOMAIIDominanceCounter implements InterfaceSelection, java.io
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -73,13 +73,13 @@ public class SelectMOMaxiMin implements InterfaceSelection, java.io.Serializable
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -143,13 +143,13 @@ public class SelectMONSGAIICrowedTournament implements InterfaceSelection, java.
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -97,13 +97,13 @@ public class SelectMONonDominated implements InterfaceSelection, java.io.Seriali
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**

View File

@ -90,13 +90,13 @@ public class SelectMOPESA implements InterfaceSelection, java.io.Serializable {
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -126,13 +126,13 @@ public class SelectMOPESAII implements InterfaceSelection, java.io.Serializable
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -113,13 +113,13 @@ public class SelectMOSPEAII implements InterfaceSelection, java.io.Serializable
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -133,13 +133,13 @@ public class SelectParticleWheel implements InterfaceSelection, java.io.Serializ
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************

View File

@ -96,18 +96,15 @@ public class SelectRandom implements InterfaceSelection, java.io.Serializable {
* This method allows you to select partners for a given Individual
*
* @param dad The already selected parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************
* These are for GUI
*/
/**
* This method allows the CommonJavaObjectEditorPanel to read the
* name to the current object.

View File

@ -9,11 +9,6 @@ import eva2.tools.math.RNG;
* also scaling invariant.
* In case of multiple fitness values the selection
* critria is selected randomly for each selection event.
* Created by IntelliJ IDEA.
* User: streiche
* Date: 01.04.2003
* Time: 16:17:26
* To change this template use Options | File Templates.
*/
public class SelectTournament implements InterfaceSelection, java.io.Serializable {
@ -112,18 +107,15 @@ public class SelectTournament implements InterfaceSelection, java.io.Serializabl
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**********************************************************************************************************************
* These are for GUI
*/
/**
* This method allows the CommonJavaObjectEditorPanel to read the
* name to the current object.

View File

@ -146,13 +146,13 @@ public class SelectXProbRouletteWheel implements InterfaceSelection, java.io.Ser
* This method allows you to select partners for a given Individual
*
* @param dad The already seleceted parent
* @param avaiablePartners The mating pool.
* @param availablePartners The mating pool.
* @param size The number of partners needed.
* @return The selected partners.
*/
@Override
public Population findPartnerFor(AbstractEAIndividual dad, Population avaiablePartners, int size) {
return this.selectFrom(avaiablePartners, size);
public Population findPartnerFor(AbstractEAIndividual dad, Population availablePartners, int size) {
return this.selectFrom(availablePartners, size);
}
/**

View File

@ -38,12 +38,12 @@ public class CombinedTerminator implements InterfaceTerminator, Serializable {
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
if (t1 != null) {
t1.init(prob);
t1.initialize(prob);
}
if (t2 != null) {
t2.init(prob);
t2.initialize(prob);
}
msg = "Not terminated.";
}

View File

@ -4,6 +4,7 @@ import eva2.optimization.population.InterfaceSolutionSet;
import eva2.optimization.population.PopulationInterface;
import eva2.problems.InterfaceOptimizationProblem;
import eva2.util.annotation.Description;
import eva2.util.annotation.Parameter;
import java.io.Serializable;
@ -20,13 +21,14 @@ public class EvaluationTerminator implements InterfaceTerminator,
/**
* Number of fitness calls on the problem which is optimized.
*/
@Parameter(name = "Max. Fitness Calls", description = "Number of calls to fitness function.")
protected int maxFitnessCalls = 1000;
public EvaluationTerminator() {
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
msg = "Not terminated.";
}
@ -74,14 +76,4 @@ public class EvaluationTerminator implements InterfaceTerminator,
//System.out.println("getFitnessCalls"+maxFitnessCalls);
return maxFitnessCalls;
}
/**
* Returns the tip text for this property
*
* @return tip text for this property
*/
public String fitnessCallsTipText() {
return "number of calls to fitness function.";
}
}

View File

@ -23,7 +23,7 @@ public class FitnessValueTerminator implements InterfaceTerminator,
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
msg = "Not terminated.";
}

View File

@ -20,7 +20,7 @@ public class GenerationTerminator implements InterfaceTerminator, Serializable {
private String msg = "";
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
msg = "Not terminated.";
}

View File

@ -42,7 +42,7 @@ public class HistoryConvergenceTerminator implements InterfaceTerminator, Serial
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
msg = "Not terminated.";
}

View File

@ -6,8 +6,6 @@ import eva2.problems.InterfaceOptimizationProblem;
/**
* Interface for a termination criterion.
*
* @author mkron, streiche
*/
public interface InterfaceTerminator {
/**
@ -25,5 +23,5 @@ public interface InterfaceTerminator {
public String lastTerminationMessage();
public void init(InterfaceOptimizationProblem prob);
public void initialize(InterfaceOptimizationProblem prob);
}

View File

@ -29,7 +29,7 @@ public class KnownOptimaFoundTerminator implements InterfaceTerminator, Serializ
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
if (prob != null) {
if (prob instanceof InterfaceMultimodalProblemKnown) {
mProblem = (InterfaceMultimodalProblemKnown) prob;

View File

@ -43,8 +43,8 @@ public class ParetoMetricTerminator extends PopulationMeasureTerminator implemen
}
@Override
public void init(InterfaceOptimizationProblem prob) {
super.init(prob);
public void initialize(InterfaceOptimizationProblem prob) {
super.initialize(prob);
if (prob instanceof AbstractMultiObjectiveOptimizationProblem) {
moProb = (AbstractMultiObjectiveOptimizationProblem) prob;
} else {

View File

@ -28,8 +28,8 @@ public class PhenotypeConvergenceTerminator extends PopulationMeasureTerminator
}
@Override
public void init(InterfaceOptimizationProblem prob) {
super.init(prob);
public void initialize(InterfaceOptimizationProblem prob) {
super.initialize(prob);
// oldPhenNorm = 0;
oldIndy = null;
}

View File

@ -76,7 +76,7 @@ public abstract class PopulationMeasureTerminator implements InterfaceTerminator
}
@Override
public void init(InterfaceOptimizationProblem prob) {
public void initialize(InterfaceOptimizationProblem prob) {
firstTime = true;
msg = "Not terminated.";
// oldFit = null;

View File

@ -1031,7 +1031,7 @@ public class Population extends ArrayList implements PopulationInterface, Clonea
* @return The index of the best (worst) individual.
*/
public int getIndexOfBestOrWorstIndividual(boolean bBest, Comparator<Object> comparator) {
ArrayList<?> sorted = sortBy(comparator);
ArrayList<?> sorted = getSorted(comparator);
if (bBest) {
return indexOf(sorted.get(0));
} else {

View File

@ -12,8 +12,6 @@ import java.util.List;
/**
* Do some statistical tests on a set of job results. Note that the plausibility (comparability of the
* jobs) is not tested here.
*
* @author mkron
*/
public class EvAStatisticalEvaluation {
@ -230,9 +228,6 @@ public class EvAStatisticalEvaluation {
if (dat1 != null && dat2 != null) {
t = Mathematics.tTestEqSizeEqVar(dat1, dat2);
}
// MannWhitneyTest mwt = new MannWhitneyTest(job1.getDoubleDataColumn(field), job2.getDoubleDataColumn(field));
// double t = mwt.getSP();
// t = roundTo2DecimalPlaces(t);
return "" + t;
}
@ -243,7 +238,6 @@ public class EvAStatisticalEvaluation {
if (dat1 != null && dat2 != null) {
t = Mathematics.tTestUnEqSizeEqVar(dat1, dat2);
}
// t = roundTo2DecimalPlaces(t);
return "" + t;
}
@ -254,7 +248,6 @@ public class EvAStatisticalEvaluation {
if (dat1 != null && dat2 != null) {
t = Mathematics.tTestUnEqSizeUnEqVar(dat1, dat2);
}
// t = roundTo2DecimalPlaces(t);
return "" + t;
}
@ -266,8 +259,6 @@ public class EvAStatisticalEvaluation {
Object obj = ReflectPackage.instantiateWithParams("jsc.independentsamples.MannWhitneyTest", new Object[]{dat1, dat2}, null);
if (obj != null) {
Object sp = BeanInspector.callIfAvailable(obj, "getSP", new Object[]{});
// System.out.println(BeanInspector.niceToString(obj));
// System.out.println("SP val is " + sp);
t = (Double) sp;
} else {
System.err.println("For the MannWhitney test, the JSC package is required on the class path!");

View File

@ -162,16 +162,16 @@ public class GenericStatistics implements Serializable {
String desc = fields[i].toString(); //System.out.println("desc "+desc);
int istransient = desc.indexOf("transient");
Object FieldValue = null;
Object fieldValue = null;
if (istransient == -1 || fields[i].getName().equals("elementData")) { // the elementdatahack
fields[i].setAccessible(true);
try {
FieldValue = fields[i].get(target);
if (FieldValue instanceof Double) {
data[index] = ((Double) FieldValue).doubleValue();
fieldValue = fields[i].get(target);
if (fieldValue instanceof Double) {
data[index] = (Double) fieldValue;
}
if (FieldValue instanceof Integer) {
data[index] = ((Integer) FieldValue).doubleValue();
if (fieldValue instanceof Integer) {
data[index] = ((Integer) fieldValue).doubleValue();
}
index++;
} catch (Exception ex) {

View File

@ -35,14 +35,6 @@ public enum GraphSelectionEnum {
}
}
// public static boolean doPlotCurrentBest(StringSelection sel) {
// return sel.isSelected(GraphSelectionEnum.currentBest.ordinal());
// }
//
// public static boolean doPlotRunBest(StringSelection sel) {
// return sel.isSelected(GraphSelectionEnum.runBest.ordinal());
// }
//
public static boolean doPlotWorst(StringSelection sel) {
return sel.isSelected(GraphSelectionEnum.currentWorst.ordinal());
}
@ -51,14 +43,6 @@ public enum GraphSelectionEnum {
return sel.isSelected(GraphSelectionEnum.meanFit.ordinal());
}
// public static boolean doPlotCurrentBestFeasible(StringSelection sel) {
// return sel.isSelected(GraphSelectionEnum.currentBestFeasible.ordinal());
// }
//
// public static boolean doPlotRunBestFeasible(StringSelection sel) {
// return sel.isSelected(GraphSelectionEnum.runBestFeasible.ordinal());
// }
//
public static boolean doPlotAvgEucDist(StringSelection sel) {
return sel.isSelected(GraphSelectionEnum.avgEucPopDistance.ordinal());
}

View File

@ -13,8 +13,6 @@ import java.util.List;
* framework should guarantee that the job is removed as a statistics listener.
* <p/>
* A job contains data fields of a multi-run experiment and header strings describing the data.
*
* @author mkron
*/
public class OptimizationJob implements Serializable, InterfaceStatisticsListener {

View File

@ -32,7 +32,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
private Graph[][] fitnessGraph;
private Graph[][] statGraph;
private String graphInfoString;
protected int plotCounter;
private JTextoutputFrameInterface proxyPrinter;
/*
* List of descriptor strings and optional indices. strictly its redundant
@ -135,7 +134,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
for (int i = 0; i < fitnessGraph.length; i++) {
fitnessGraph[i] = new Graph[graphCount];
for (int j = 0; j < fitnessGraph[i].length; j++) {
// String[] d = (String[]) description.get(i);
// this is where the column string for ascii export is created! Uah!
fitnessGraph[i][j] =
fitnessFrame[i].getNewGraph(graphDesc.get(j).head + "_"
@ -166,12 +164,6 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
return;
}
boolean isValidGraph = fitnessFrame[graph].isValid();
if (!isValidGraph) {
// this happens if the user closed the plot window.
// if the plots are reinitialized immediately, the user might get angry, so wait (till next opt start)
// EVAERROR.WARNING("fitness graph is invalid, trying to reinitialize...");
// initPlots(getDescription());
}
if (isValidGraph) {
fitnessGraph[graph][subGraph].setConnectedPoint(x, y);
}
@ -242,6 +234,5 @@ public class StatisticsWithGUI extends AbstractStatistics implements Serializabl
index++;
}
}
// }
}
}

View File

@ -131,7 +131,7 @@ public class EvolutionStrategyIPOP extends EvolutionStrategies implements Interf
// update the stagnation time in the terminator
if (!isStagnationTimeUserDef() && (fitConvTerm != null)) {
fitConvTerm.setStagnationTime(calcDefaultStagnationTime());
fitConvTerm.init(getProblem());
fitConvTerm.initialize(getProblem());
}
bestList.add(best);
best = null;

View File

@ -116,7 +116,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
}*/
}
this.migration.initMigration(this.islands);
this.migration.initializeMigration(this.islands);
Population pop;
this.population.incrGeneration(); // the island-initialization has increased the island-pop generations.
@ -183,7 +183,7 @@ public class IslandModelEA implements InterfacePopulationChangedEventListener, I
}*/
}
this.migration.initMigration(this.islands);
this.migration.initializeMigration(this.islands);
Population pop;
for (int i = 0; i < this.islands.length; i++) {
pop = (Population) this.islands[i].getPopulation().clone();

View File

@ -33,10 +33,6 @@ public abstract class AbstractObjectEditor implements PropertyEditor, java.beans
public GeneralGenericObjectEditorPanel objectEditorPanel;
public Hashtable editorTable = new Hashtable();
/**
* ****************************** java.beans.PropertyChangeListener ************************
*/
@Override
public void addPropertyChangeListener(PropertyChangeListener l) {
if (propertyChangeSupport == null) {

View File

@ -9,13 +9,7 @@ import java.awt.*;
import java.io.*;
import java.util.ArrayList;
/**
* Created by IntelliJ IDEA.
* User: streiche
* Date: 09.06.2005
* Time: 13:01:18
* To change this template use File | Settings | File Templates.
*/
public class FileTools {

View File

@ -359,31 +359,6 @@ public class BasicResourceLoader implements ResourceLoader {
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.
*
@ -626,6 +601,4 @@ public class BasicResourceLoader implements ResourceLoader {
}
return userProps;
}
}

View File

@ -3,29 +3,19 @@ package eva2.tools;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Title: EvA2
* Description:
* Copyright: Copyright (c) 2003
* Company: University of Tuebingen, Computer Architecture
* @author Holger Ulmer, Felix Streichert, Hannes Planatscher
* @version: $Revision: 245 $
* $Date: 2007-11-08 17:24:53 +0100 (Thu, 08 Nov 2007) $
* $Author: mkron $
*/
/**
*
*/
public class EVAERROR {
private static final Logger logger = Logger.getLogger(EVAERROR.class.getName());
private static final Logger LOGGER = Logger.getLogger(EVAERROR.class.getName());
private static transient HashMap<String, Boolean> errorMap = null;
/**
*
*/
public static void EXIT(String message) {
logger.log(Level.SEVERE, message);
LOGGER.log(Level.SEVERE, message);
System.exit(-1);
}
@ -33,7 +23,7 @@ public class EVAERROR {
*
*/
public static void EXIT(String message, Exception ex) {
logger.log(Level.SEVERE, message, ex);
LOGGER.log(Level.SEVERE, message, ex);
System.exit(-1);
}
@ -41,7 +31,7 @@ public class EVAERROR {
*
*/
public static void WARNING(String message) {
logger.log(Level.WARNING, message);
LOGGER.log(Level.WARNING, message);
}
/**
@ -56,7 +46,7 @@ public class EVAERROR {
}
if (!errorMap.containsKey(message)) {
logger.log(Level.SEVERE, message);
LOGGER.log(Level.SEVERE, message);
errorMap.put(message, true);
}
}

View File

@ -18,15 +18,6 @@ import java.util.Vector;
/**
* MultirunRefiner
* Description: This is a small programm .
* Copyright: Copyright (c) 2001
* Company: University of Tuebingen, Computer Architecture
*
* @author Felix Streichert
* @version: $Revision: 10 $
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
* $Author: streiche $
* @since JDK 1.3.0_02
*/
public class MultirunRefiner {

View File

@ -29,14 +29,8 @@ package eva2.tools;
/**
* TODO description.
*
* @.author wegnerj
* @.license GPL
* @.cvsversion $Revision: 1.8 $, $Date: 2005/02/17 16:48:44 $
*/
public interface ResourceLoader {
//~ Methods ////////////////////////////////////////////////////////////////
/**
* Gets the byte data from a file at the given resource location.
*
@ -45,7 +39,3 @@ public interface ResourceLoader {
*/
byte[] getBytesFromResourceLocation(String rawResrcLoc);
}
///////////////////////////////////////////////////////////////////////////////
//END OF FILE.
///////////////////////////////////////////////////////////////////////////////

View File

@ -9,8 +9,6 @@ import java.util.regex.Pattern;
/**
* Utility class to provide simplification functions
* for working with Strings.
*
* @author Fabian Becker, Marcel Kronfeld
*/
public final class StringTools {
@ -103,13 +101,6 @@ public final class StringTools {
return -1;
}
// public static void main(String[] args) {
// System.out.println(toHTML("Hallo-asdfsadfsafdsadfo, dies ist ein doller test text!", 15));
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 15));
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 25));
// System.out.println(toHTML("Set the interval of data output for intermediate verbosity (in generations).", 30));
// }
/**
* Parse an array of Strings as an argument list. Take the argument list, a set of keys together
* with their arities. Returns for each key a value depending on arity and whether it was found.

View File

@ -8,17 +8,7 @@ package eva2.tools;
import javax.swing.filechooser.FileFilter;
/**
* TXTFileFilter
* Description: A simple File Filter for *.txt files.
* Copyright: Copyright (c) 2001
* Company: University of Tuebingen, Computer Architecture
*
* @author Felix Streichert
* @version: $Revision: 10 $
* $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $
* $Author: streiche $
* @since JDK 1.3.0_02
/**A simple File Filter for *.txt files.
*/
public class TXTFileFilter extends FileFilter {

View File

@ -5,16 +5,6 @@ import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
/**
* <p>Title: EvA2</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class URLGetter {
public URLGetter() {

View File

@ -12,25 +12,12 @@
package eva2.tools.diagram;
/*============================================================================
* IMPORTS
*============================================================================*/
import java.awt.*;
/*============================================================================
* CLASS DECLARATION
*============================================================================*/
/**
* Calculates the color values for a legend-style color bar.
*/
public class ColorBarCalculator {
/*--------------------------------------------------------------------------
* static public final member variables
*--------------------------------------------------------------------------*/
static public final int BLUE_TO_RED = 0;
static public final int GREY_SCALE = 1;
static public final int BLUE_SCALE = 2;
@ -38,25 +25,13 @@ public class ColorBarCalculator {
// GREY_SCALE returns luminance values in [0.1;0.9], GREY_EXTENDED_SCALE in [0.0;1.0]
static public final int GREY_EXTENDED_SCALE = 4;
/*--------------------------------------------------------------------------
* private member variables
*--------------------------------------------------------------------------*/
private int color_scale = BLUE_TO_RED;
private boolean inverseScale = false;
/*--------------------------------------------------------------------------
* constructor
*--------------------------------------------------------------------------*/
public ColorBarCalculator(int color_scale) {
this.color_scale = color_scale;
}
/*--------------------------------------------------------------------------
* public methods
*--------------------------------------------------------------------------*/
public void setColorScale(int color_scale) {
this.color_scale = color_scale;
}
@ -122,10 +97,6 @@ public class ColorBarCalculator {
return inverseScale;
}
/*--------------------------------------------------------------------------
* static public methods
*--------------------------------------------------------------------------*/
/**
* Returns color for the given float-value, which must be in the range from 0 to 1.
* Warning: Creates new color object, better use the method 'getRGB' if possible.
@ -142,8 +113,3 @@ public class ColorBarCalculator {
return Color.HSBtoRGB(hue, 0.6F, 1F);
}
}
/****************************************************************************
* END OF FILE
****************************************************************************/

View File

@ -22,10 +22,6 @@ import eva2.tools.math.Jama.util.Maths;
public class EigenvalueDecomposition implements java.io.Serializable {
/* ------------------------
Class variables
* ------------------------ */
/**
* Row and column dimension (square matrix).
*

View File

@ -17,10 +17,6 @@ package eva2.tools.math.Jama;
public class LUDecomposition implements java.io.Serializable {
/* ------------------------
Class variables
* ------------------------ */
/**
* Array for internal storage of decomposition.
*

View File

@ -68,10 +68,6 @@ public class Matrix implements Cloneable, Serializable {
*/
private static final long serialVersionUID = 3672826349694248499L;
/* ------------------------
Class variables
* ------------------------ */
/**
* Array for internal storage of elements.
*
@ -87,10 +83,6 @@ public class Matrix implements Cloneable, Serializable {
*/
private int m, n;
/* ------------------------
Constructors
* ------------------------ */
/**
* Construct an m-by-n matrix of zeros.
*
@ -213,11 +205,6 @@ public class Matrix implements Cloneable, Serializable {
return Ret;
}
/* ------------------------
Public Methods
* ------------------------ */
/**
* Construct a matrix from a copy of a 2-D array.
*
@ -309,9 +296,6 @@ public class Matrix implements Cloneable, Serializable {
double[][] C = new double[m][n];
for (int i = 0; i < m; i++) {
System.arraycopy(A[i], 0, C[i], 0, n);
// for (int j = 0; j < n; j++) {
// C[i][j] = A[i][j];
// }
}
return C;
}
@ -1396,11 +1380,6 @@ public class Matrix implements Cloneable, Serializable {
return new Matrix(A);
}
/* ------------------------
Private Methods
* ------------------------ */
/**
* Check if size(A) == size(B) *
*/

View File

@ -12,20 +12,12 @@
package eva2.tools.print;
/*==========================================================================*
* IMPORTS
*==========================================================================*/
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
/*==========================================================================*
* CLASS DECLARATION
*==========================================================================*/
public class PagePrinter {
Component c;
Graphics g;
@ -151,7 +143,3 @@ public class PagePrinter {
return Printable.PAGE_EXISTS;
}
}
/****************************************************************************
* END OF FILE
****************************************************************************/