Class MarksWithTotalEnergy
Object
MarksWithTotalEnergy
- All Implemented Interfaces:
Serializable
A collection of marks with an associated (total) energy.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMarksWithTotalEnergy
(MarkCollection marks, EnergySchemeWithSharedFeatures energyScheme) Creates a new instance with the given marks and energy scheme. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(VoxelizedMarkMemo voxelizedMark) Adds a voxelized mark to the collection.deepCopy()
Makes a deep copy of this instance (except theenergyScheme
which is reused).void
exchange
(int index, VoxelizedMarkMemo newMark) Exchanges a mark at a particular index with a new mark.get
(int index) Gets the mark at the specified index.Associated Energy Scheme, which should include the EnergySavedPairs.double
The pre-annealed total energy.getMarks()
The marks in the collection.void
remove
(int index) Removes a mark at the specified index from the collection.void
setEnergyTotal
(double energyTotal) The pre-annealed total energy.void
setMarks
(MarkCollection marks) The marks in the collection.Makes a shallow copy of this instance.final int
size()
Gets the number of marks in the collection.
-
Constructor Details
-
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 theenergyScheme
which 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
Mark
at 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.
-