|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
jigcell.compare.impl.Transferer
jigcell.compare.impl.DataSource
jigcell.compare.data.DataGenerator
jigcell.compare.data.EditableDataGenerator
jigcell.compare.data.ProgrammableDataGenerator
jigcell.compare.objective.Objective
jigcell.compare.objective.MinkowskiObjective
public class MinkowskiObjective
A generator whose function is a Lebesgue p-norm.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Nested Class Summary | |
|---|---|
protected static class |
MinkowskiObjective.MinkowskiObjectiveDelegate
Persists the generator using the p-value rather than storing any state information. |
| Nested classes/interfaces inherited from class jigcell.compare.data.EditableDataGenerator |
|---|
EditableDataGenerator.EditableDataGeneratorDelegate |
| Nested classes/interfaces inherited from interface jigcell.compare.IDataSource |
|---|
IDataSource.Option |
| Field Summary | |
|---|---|
protected static int |
BUFFER_LENGTH
Length of slices to work with |
static java.lang.String |
ELEMENTWEIGHT_PRECIPROCAL
Default element weight of the pth power of the reciprocal of the element |
static java.lang.String |
ELEMENTWEIGHT_RECIPROCAL
Default element weight of the reciprocal of the element |
static java.lang.String |
ELEMENTWEIGHT_RECIPROCALSQUARE
Default element weight of the square of the reciprocal of the element |
protected static java.lang.String |
MESSAGE_SMALLPERROR
Error message when the p-value is too small |
protected static java.lang.String |
NAME_GENERATOR_POSTPEND
End of generator name for arbitrary p |
protected static java.lang.String |
NAME_GENERATOR_PREPEND
Beginning of generator name for arbitrary p |
protected static java.lang.String |
NAME_GENERATORINF
Generator name for p = +infinity |
protected double |
p
Power |
protected static double |
SMALL_VALUE
Size of the largest small double |
| Fields inherited from class jigcell.compare.objective.Objective |
|---|
ERROR, OPTION_DATA, OPTION_FUNCTION |
| Fields inherited from class jigcell.compare.data.ProgrammableDataGenerator |
|---|
allowDescriptionQuery, callStack, listenerList |
| Fields inherited from class jigcell.compare.data.DataGenerator |
|---|
COMPARATOR_NAME, DESCRIPTION_READ, SEPARATOR_ESCAPE, SPECIAL_CHARS |
| Fields inherited from class jigcell.compare.impl.DataSource |
|---|
OPTIONS_LOCK, SEPARATOR_PAIR, SEPARATOR_PART, SEPARATORS |
| Fields inherited from class jigcell.compare.impl.Transferer |
|---|
CSV_FOOTER, CSV_LINEPOSTPEND, CSV_LINEPREPEND, CSV_LINESEPARATOR, HTML_FOOTER, HTML_HEADPOSTPEND, HTML_HEADPREPEND, HTML_HEADSEPARATOR, HTML_LINEPOSTPEND, HTML_LINEPREPEND, HTML_LINESEPARATOR |
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, MOVE, NONE |
| Fields inherited from interface jigcell.compare.objective.IElementWeightObjective |
|---|
ATTRIBUTE_DEFAULTELEMENTWEIGHT, ATTRIBUTE_ELEMENTWEIGHTS, ELEMENTWEIGHT_0, ELEMENTWEIGHT_1, OPTION_DEFAULTELEMENTWEIGHTS |
| Fields inherited from interface jigcell.compare.IDataGenerator |
|---|
ATTRIBUTE_COMMENT, ATTRIBUTE_GUID, PROPERTY_GENERATOR_EDIT, RESOURCE_GENERATORS |
| Fields inherited from interface jigcell.compare.IReadableDataSource |
|---|
OPTION_READDESCRIPTION, OPTION_READICON |
| Fields inherited from interface jigcell.compare.IDataSource |
|---|
OPTION_NAME |
| Fields inherited from interface jigcell.compare.objective.IObjective |
|---|
OPTION_OBJECTIVE, PROPERTY_OBJECTIVE_EDIT, RESOURCE_OBJECTIVES |
| Fields inherited from interface jigcell.compare.IProgrammableDataGenerator |
|---|
METHOD_GENERATE, OPTION_COMPARE, OPTION_INPUTTYPECHECKER, OPTION_OUTPUTTYPECHECKER |
| Fields inherited from interface jigcell.compare.IWriteableDataSource |
|---|
OPTION_WRITEDESCRIPTION, OPTION_WRITEICON |
| Constructor Summary | |
|---|---|
MinkowskiObjective()
Creatas a new data generator based upon a vector norm. |
|
MinkowskiObjective(double p)
Creatas a new data generator based upon a vector norm. |
|
| Method Summary | |
|---|---|
protected void |
copy(boolean shallow,
IDataGenerator target)
Copies state for this generator. |
protected IDataElement |
evaluate(IDataElement input)
Computes the values of this generator. |
protected IDataElement |
evaluate1(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
Evaluates and returns the associated element for p = 1.0. |
protected IDataElement |
evaluate2(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
Evaluates and returns the associated element for p = 2.0. |
protected IDataElement |
evaluateMax(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
Evaluates and returns the associated element for p = infinity. |
protected IDataElement |
evaluatep(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
Evaluates and returns the associated element for finite p. |
static java.lang.Object |
getCustomizableInstances()
Generates an instance of a 1-norm, 2-norm, and max-norm. |
java.lang.String |
getDefaultElementWeight()
The element weight default. |
java.util.List |
getDefaultElementWeights()
Valid element weight defaults. |
IDataElement |
getElementWeights()
The element weights. |
double |
getP()
The p. |
void |
setDefaultElementWeight(java.lang.String weight)
Sets the element weights. |
void |
setElementWeights(IDataElement weights)
Sets the suggested element weights. |
protected void |
setWeights(java.lang.String key,
java.lang.String weights)
Sets a weight. |
| Methods inherited from class jigcell.compare.objective.Objective |
|---|
evaluate, getData, getFunction, getObjectiveForGenerator, setData, setFunction |
| Methods inherited from class jigcell.compare.data.EditableDataGenerator |
|---|
getPredictedCompatibility, getPredictedCompatibility, isSet, setAttribute, setComment, setElement, setElement, setOption, setState, write |
| Methods inherited from class jigcell.compare.data.DataGenerator |
|---|
clone, compareByName, copy, generateGUID, getAttribute, getComment, getCopiedFrom, getName, getPredictedContents, getTransferData, isCopy, isCopyRelated, read, setCopyName, setName, toString |
| Methods inherited from class jigcell.compare.impl.Transferer |
|---|
addExtension, addFlavor, createCSVTable, createFormattedTable, createHTMLTable, getExceptionRecorder, getExpectedClasses, getExpectedClasses, getExpectedClasses, getFlavors, getFlavors, getPreferredExtensions, getPreferredExtensions, getTransferClass, getTransferDataFlavors, getTransferFlavor, isDataFlavorSupported, transfer |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jigcell.compare.IDataGenerator |
|---|
copy, getAttribute, getComment, getCopiedFrom, getElement, isCached, isCopy, isCopyRelated, setAttribute |
| Methods inherited from interface jigcell.compare.IReadableDataSource |
|---|
getPredictedContents, getReadDescriptionOption, getReadIconOption, read, setReadDescriptionOption, setReadIconOption |
| Methods inherited from interface jigcell.compare.IDataSource |
|---|
addOption, clone, configure, getName, getOption, getState, setOption, setState |
| Methods inherited from interface java.awt.datatransfer.Transferable |
|---|
getTransferData, getTransferDataFlavors, isDataFlavorSupported |
| Methods inherited from interface jigcell.compare.objective.IObjective |
|---|
clear |
| Methods inherited from interface jigcell.compare.IProgrammableDataGenerator |
|---|
addEvaluationListener, getCallStack, getElement, getEvaluationLock, getInputTypeChecker, getInterface, getOutputTypeChecker, peekElement, removeEvaluationListener |
| Methods inherited from interface jigcell.compare.IEditableDataGenerator |
|---|
setComment, setCopyName, setElement, setName |
| Methods inherited from interface jigcell.compare.IWriteableDataSource |
|---|
getPredictedCompatibility, getPredictedCompatibility, getWriteDescriptionOption, getWriteIconOption, setWriteDescriptionOption, setWriteIconOption, write |
| Field Detail |
|---|
public static final java.lang.String ELEMENTWEIGHT_PRECIPROCAL
public static final java.lang.String ELEMENTWEIGHT_RECIPROCAL
public static final java.lang.String ELEMENTWEIGHT_RECIPROCALSQUARE
protected static final double SMALL_VALUE
protected static final int BUFFER_LENGTH
protected static final java.lang.String MESSAGE_SMALLPERROR
protected static final java.lang.String NAME_GENERATOR_POSTPEND
protected static final java.lang.String NAME_GENERATOR_PREPEND
protected static final java.lang.String NAME_GENERATORINF
protected double p
| Constructor Detail |
|---|
public MinkowskiObjective()
public MinkowskiObjective(double p)
p - P-norm| Method Detail |
|---|
public static java.lang.Object getCustomizableInstances()
public java.lang.String getDefaultElementWeight()
getDefaultElementWeight in interface IElementWeightObjectivepublic java.util.List getDefaultElementWeights()
getDefaultElementWeights in interface IElementWeightObjectivepublic IDataElement getElementWeights()
getElementWeights in interface IElementWeightObjectivepublic double getP()
public void setDefaultElementWeight(java.lang.String weight)
setDefaultElementWeight in interface IElementWeightObjectiveweight - Element weight defaultpublic void setElementWeights(IDataElement weights)
setElementWeights in interface IElementWeightObjectiveweights - Element weights
protected void copy(boolean shallow,
IDataGenerator target)
copy in class ProgrammableDataGeneratorshallow - Whether the copy is shallowtarget - Generator to copy toprotected IDataElement evaluate(IDataElement input)
evaluate in class Objectiveinput - List of the inputs provided to this generator
protected IDataElement evaluate1(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
e1 - Series 1e2 - Series 2elementWeights - Scale of point valuesdefaultWeight - Default element weighte1Buffer - Buffer for e1e2Buffer - Buffer for e2scaleBuffer - Buffer for element weights
protected IDataElement evaluate2(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
e1 - Series 1e2 - Series 2elementWeights - Scale of point valuesdefaultWeight - Default element weighte1Buffer - Buffer for e1e2Buffer - Buffer for e2scaleBuffer - Buffer for element weights
protected IDataElement evaluateMax(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
e1 - Series 1e2 - Series 2elementWeights - Scale of point valuesdefaultWeight - Default element weighte1Buffer - Buffer for e1e2Buffer - Buffer for e2scaleBuffer - Buffer for element weights
protected IDataElement evaluatep(IDataElement e1,
IDataElement e2,
IDataElement elementWeights,
double defaultWeight,
double[] e1Buffer,
double[] e2Buffer,
double[] scaleBuffer)
e1 - Series 1e2 - Series 2elementWeights - Scale of point valuesdefaultWeight - Default element weighte1Buffer - Buffer for e1e2Buffer - Buffer for e2scaleBuffer - Buffer for element weights
protected void setWeights(java.lang.String key,
java.lang.String weights)
key - Weight nameweights - Weights
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||