Package org.anchoranalysis.mpp.mark
Interface UpdatableMarks
- All Known Implementing Classes:
EnergySavedPairs
,MarkPairCollection
,RandomCollection
,RandomCollectionWithAddCriteria
public interface UpdatableMarks
An interface for managing a set of marks that can be updated.
This interface provides methods for initializing, adding, exchanging, and removing marks from a set, while maintaining any necessary internal state or data structures.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(MemoForIndex marksExisting, VoxelizedMarkMemo newMark) Adds a new mark to the existing set of marks.void
exchange
(MemoForIndex memo, VoxelizedMarkMemo oldMark, int indexOldMark, VoxelizedMarkMemo newMark) Exchanges an existing mark with a new one.void
initUpdatableMarks
(MemoForIndex memo, EnergyStack energyStack, Logger logger, SharedFeatures sharedFeatures) Initializes the updatable marks with necessary context.void
remove
(MemoForIndex marksExisting, VoxelizedMarkMemo mark) Removes a mark from the existing set of marks.
-
Method Details
-
add
Adds a new mark to the existing set of marks.- Parameters:
marksExisting
- the existing set of marksnewMark
- the new mark to be added- Throws:
UpdateMarkSetException
- if the addition operation fails
-
exchange
void exchange(MemoForIndex memo, VoxelizedMarkMemo oldMark, int indexOldMark, VoxelizedMarkMemo newMark) throws UpdateMarkSetException Exchanges an existing mark with a new one.- Parameters:
memo
- the memo for indexingoldMark
- the mark to be replacedindexOldMark
- the index of the old marknewMark
- the new mark to replace the old one- Throws:
UpdateMarkSetException
- if the exchange operation fails
-
remove
Removes a mark from the existing set of marks.- Parameters:
marksExisting
- the existing set of marksmark
- the mark to be removed- Throws:
UpdateMarkSetException
- if the removal operation fails