Package org.anchoranalysis.mpp.mark
Interface UpdatableMarks
- All Known Implementing Classes:
RandomCollection
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 Type Method Description voidadd(MemoForIndex marksExisting, VoxelizedMarkMemo newMark)Adds a new mark to the existing set of marks.voidexchange(MemoForIndex memo, VoxelizedMarkMemo oldMark, int indexOldMark, VoxelizedMarkMemo newMark)Exchanges an existing mark with a new one.voidinitUpdatableMarks(MemoForIndex memo, EnergyStack energyStack, Logger logger, SharedFeatures sharedFeatures)Initializes the updatable marks with necessary context.voidremove(MemoForIndex marksExisting, VoxelizedMarkMemo mark)Removes a mark from the existing set of marks.
-
Method Details
-
initUpdatableMarks
void initUpdatableMarks(MemoForIndex memo, EnergyStack energyStack, Logger logger, SharedFeatures sharedFeatures) throws InitializeExceptionInitializes the updatable marks with necessary context.- Parameters:
memo- the memo for indexingenergyStack- the energy stacklogger- the logger for any logging operationssharedFeatures- shared features to be used- Throws:
InitializeException- if initialization fails
-
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 UpdateMarkSetExceptionExchanges 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
-