Class Gene
java.lang.Object
com.hexagram2021.chromosomelib.common.gene.Gene
A gene is a unit of hereditary information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<net.minecraft.core.Holder<Gene>>net.minecraft.core.Holder<GeneLocus>The locus of this gene.int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Get the code of this gene.static voidDo NOT call this method while iterating over the set.static booleanisConnected(net.minecraft.core.Holder<Gene> gene1, net.minecraft.core.Holder<Gene> gene2) Deprecated.I don't think you need this lol.static voidsetDisableRelationship(com.google.common.graph.ImmutableGraph<net.minecraft.core.Holder<Gene>> disableRelationship)
-
Field Details
-
COMPARATOR
-
geneLocus
The locus of this gene. -
topologicalOrder
@Internal public int topologicalOrder- See Also:
-
RegistryRelations.buildGeneTopologicalOrder(net.minecraft.core.Registry<com.hexagram2021.chromosomelib.common.gene.Gene>)
-
-
Constructor Details
-
Gene
-
-
Method Details
-
code
Get the code of this gene.- Returns:
- code
-
isConnected
@Deprecated public static boolean isConnected(net.minecraft.core.Holder<Gene> gene1, net.minecraft.core.Holder<Gene> gene2) Deprecated.I don't think you need this lol.Use Breadth-First Search to check whether two genes are connected or not.- Parameters:
gene1- the first gene, probably the dominant genegene2- the second gene, probably the recessive gene- Returns:
trueif two genes are connected,falseotherwise- See Also:
-
doDisable
@Internal public static void doDisable(it.unimi.dsi.fastutil.objects.Object2IntMap<net.minecraft.core.Holder<Gene>> map) Do NOT call this method while iterating over the set.Idempotency: for any legal set
s, after calling the firstdoDisable(s), any call todoDisable(s)will have no effect to sets.- Parameters:
map- the map of all genes, which may contains some genes to be disabled.
-
setDisableRelationship
@Internal public static void setDisableRelationship(com.google.common.graph.ImmutableGraph<net.minecraft.core.Holder<Gene>> disableRelationship)
-