Class ImmutableDynamicProgrammingAll
java.lang.Object
pl.poznan.put.structure.pseudoknots.dp.DynamicProgrammingAll
pl.poznan.put.structure.pseudoknots.dp.ImmutableDynamicProgrammingAll
- All Implemented Interfaces:
PseudoknotFinder
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableDynamicProgrammingAll
extends DynamicProgrammingAll
Immutable implementation of
DynamicProgrammingAll
.
Use the builder to create immutable instances:
ImmutableDynamicProgrammingAll.builder()
.
Use the static factory method to get the default singleton instance:
ImmutableDynamicProgrammingAll.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDynamicProgrammingAll
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableDynamicProgrammingAll
.copyOf
(DynamicProgrammingAll instance) Creates an immutable copy of aDynamicProgrammingAll
value.boolean
This instance is equal to all instances ofImmutableDynamicProgrammingAll
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:regionRemover
,maxCliqueSize
.protected int
of()
Returns the default immutable singleton value ofDynamicProgrammingAll
protected Optional<RegionRemover>
toString()
Prints the immutable valueDynamicProgrammingAll
with attribute values.withMaxCliqueSize
(int value) Copy the current immutable object by setting a value for themaxCliqueSize
attribute.withRegionRemover
(Optional<? extends RegionRemover> optional) Copy the current immutable object by setting an optional value for theregionRemover
attribute.withRegionRemover
(RegionRemover value) Copy the current immutable object by setting a present value for the optionalregionRemover
attribute.Methods inherited from class pl.poznan.put.structure.pseudoknots.dp.DynamicProgrammingAll
findOptimalSolutions, findPseudoknots
-
Method Details
-
regionRemover
- Specified by:
regionRemover
in classDynamicProgrammingAll
- Returns:
- An optional region remover to be used if a clique size exceeds
maxCliqueSize()
.
-
maxCliqueSize
protected int maxCliqueSize()- Overrides:
maxCliqueSize
in classDynamicProgrammingAll
- Returns:
- The maximum number of conflicts allowed to be in the clique. The algorithm slows down very much when the cliques are getting bigger, so it is advisable to use a heuristic to remove a single regions and decrease clique size significantly.
-
withRegionRemover
Copy the current immutable object by setting a present value for the optionalregionRemover
attribute.- Parameters:
value
- The value for regionRemover- Returns:
- A modified copy of
this
object
-
withRegionRemover
public final ImmutableDynamicProgrammingAll withRegionRemover(Optional<? extends RegionRemover> optional) Copy the current immutable object by setting an optional value for theregionRemover
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for regionRemover- Returns:
- A modified copy of
this
object
-
withMaxCliqueSize
Copy the current immutable object by setting a value for themaxCliqueSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maxCliqueSize- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableDynamicProgrammingAll
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:regionRemover
,maxCliqueSize
. -
toString
Prints the immutable valueDynamicProgrammingAll
with attribute values. -
of
Returns the default immutable singleton value ofDynamicProgrammingAll
- Returns:
- An immutable instance of DynamicProgrammingAll
-
copyOf
Creates an immutable copy of aDynamicProgrammingAll
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable DynamicProgrammingAll instance
-
builder
Creates a builder forImmutableDynamicProgrammingAll
.ImmutableDynamicProgrammingAll.builder() .regionRemover(pl.poznan.put.structure.pseudoknots.elimination.RegionRemover) // optional
regionRemover
.maxCliqueSize(int) // optionalmaxCliqueSize
.build();- Returns:
- A new ImmutableDynamicProgrammingAll builder
-