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 ofDynamicProgrammingAll.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 Classes Modifier and Type Class Description static classImmutableDynamicProgrammingAll.BuilderBuilds instances of typeImmutableDynamicProgrammingAll.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDynamicProgrammingAll.Builderbuilder()Creates a builder forImmutableDynamicProgrammingAll.static ImmutableDynamicProgrammingAllcopyOf(DynamicProgrammingAll instance)Creates an immutable copy of aDynamicProgrammingAllvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDynamicProgrammingAllthat have equal attribute values.inthashCode()Computes a hash code from attributes:regionRemover,maxCliqueSize.protected intmaxCliqueSize()static ImmutableDynamicProgrammingAllof()Returns the default immutable singleton value ofDynamicProgrammingAllprotected Optional<RegionRemover>regionRemover()StringtoString()Prints the immutable valueDynamicProgrammingAllwith attribute values.ImmutableDynamicProgrammingAllwithMaxCliqueSize(int value)Copy the current immutable object by setting a value for themaxCliqueSizeattribute.ImmutableDynamicProgrammingAllwithRegionRemover(Optional<? extends RegionRemover> optional)Copy the current immutable object by setting an optional value for theregionRemoverattribute.ImmutableDynamicProgrammingAllwithRegionRemover(RegionRemover value)Copy the current immutable object by setting a present value for the optionalregionRemoverattribute.-
Methods inherited from class pl.poznan.put.structure.pseudoknots.dp.DynamicProgrammingAll
findOptimalSolutions, findPseudoknots
-
-
-
-
Method Detail
-
regionRemover
protected Optional<RegionRemover> regionRemover()
- Specified by:
regionRemoverin classDynamicProgrammingAll- Returns:
- An optional region remover to be used if a clique size exceeds
maxCliqueSize().
-
maxCliqueSize
protected int maxCliqueSize()
- Overrides:
maxCliqueSizein 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
public final ImmutableDynamicProgrammingAll withRegionRemover(RegionRemover value)
Copy the current immutable object by setting a present value for the optionalregionRemoverattribute.- Parameters:
value- The value for regionRemover- Returns:
- A modified copy of
thisobject
-
withRegionRemover
public final ImmutableDynamicProgrammingAll withRegionRemover(Optional<? extends RegionRemover> optional)
Copy the current immutable object by setting an optional value for theregionRemoverattribute. 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
thisobject
-
withMaxCliqueSize
public final ImmutableDynamicProgrammingAll withMaxCliqueSize(int value)
Copy the current immutable object by setting a value for themaxCliqueSizeattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDynamicProgrammingAllthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:regionRemover,maxCliqueSize.
-
toString
public String toString()
Prints the immutable valueDynamicProgrammingAllwith attribute values.
-
of
public static ImmutableDynamicProgrammingAll of()
Returns the default immutable singleton value ofDynamicProgrammingAll- Returns:
- An immutable instance of DynamicProgrammingAll
-
copyOf
public static ImmutableDynamicProgrammingAll copyOf(DynamicProgrammingAll instance)
Creates an immutable copy of aDynamicProgrammingAllvalue. 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
public static ImmutableDynamicProgrammingAll.Builder builder()
Creates a builder forImmutableDynamicProgrammingAll.ImmutableDynamicProgrammingAll.builder() .regionRemover(pl.poznan.put.structure.pseudoknots.elimination.RegionRemover) // optionalregionRemover.maxCliqueSize(int) // optionalmaxCliqueSize.build();- Returns:
- A new ImmutableDynamicProgrammingAll builder
-
-