Class MarksWithTotalEnergy
Object
org.anchoranalysis.mpp.feature.energy.marks.MarksWithTotalEnergy
- All Implemented Interfaces:
Serializable
public class MarksWithTotalEnergy extends Object implements Serializable
A collection of marks with an associated (total) energy.
- Author:
- Owen Feehan
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description MarksWithTotalEnergy(MarkCollection marks, EnergySchemeWithSharedFeatures energyScheme)Creates a new instance with the given marks and energy scheme. -
Method Summary
Modifier and Type Method Description voidadd(VoxelizedMarkMemo voxelizedMark)Adds a voxelized mark to the collection.MarksWithTotalEnergydeepCopy()Makes a deep copy of this instance (except theenergySchemewhich is reused).voidexchange(int index, VoxelizedMarkMemo newMark)Exchanges a mark at a particular index with a new mark.Markget(int index)Gets the mark at the specified index.EnergySchemeWithSharedFeaturesgetEnergyScheme()Associated Energy Scheme, which should include the EnergySavedPairs.doublegetEnergyTotal()The pre-annealed total energy.MarkCollectiongetMarks()The marks in the collection.voidremove(int index)Removes a mark at the specified index from the collection.voidsetEnergyTotal(double energyTotal)The pre-annealed total energy.voidsetMarks(MarkCollection marks)The marks in the collection.MarksWithTotalEnergyshallowCopy()Makes a shallow copy of this instance.intsize()Gets the number of marks in the collection.
-
Constructor Details
-
MarksWithTotalEnergy
Creates a new instance with the given marks and energy scheme.- Parameters:
marks- the collection of marksenergyScheme- the energy scheme with shared features
-
-
Method Details
-
shallowCopy
Makes a shallow copy of this instance.- Returns:
- a newly created object with identical contents (all member fields reused)
-
deepCopy
Makes a deep copy of this instance (except theenergySchemewhich is reused).- Returns:
- a newly created object with identical contents (some member fields duplicated, some reused)
-
add
Adds a voxelized mark to the collection.- Parameters:
voxelizedMark- the voxelized mark to add
-
remove
public void remove(int index)Removes a mark at the specified index from the collection.- Parameters:
index- the index of the mark to remove
-
exchange
Exchanges a mark at a particular index with a new mark.- Parameters:
index- the index of the mark to exchangenewMark- the new voxelized mark to replace the existing mark
-
size
public final int size()Gets the number of marks in the collection.- Returns:
- the number of marks
-
get
Gets the mark at the specified index.- Parameters:
index- the index of the mark to retrieve- Returns:
- the
Markat the specified index
-
getMarks
The marks in the collection. -
setMarks
The marks in the collection. -
getEnergyScheme
Associated Energy Scheme, which should include the EnergySavedPairs. -
getEnergyTotal
public double getEnergyTotal()The pre-annealed total energy. -
setEnergyTotal
public void setEnergyTotal(double energyTotal)The pre-annealed total energy.
-