Record Class GrammarEncoding
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.repr.grammar.encoding.GrammarEncoding
public record GrammarEncoding(int maxDepth, int maxNodes, int bitsPerDecision, int bitsPerErc, int genomeLength)
extends Record
Deterministic fixed-length encoding metadata for grammar derivation decisions.
-
Constructor Summary
ConstructorsConstructorDescriptionGrammarEncoding(int maxDepth, int maxNodes, int bitsPerDecision, int bitsPerErc, int genomeLength) Creates an instance of aGrammarEncodingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebitsPerDecisionrecord component.intReturns the value of thebitsPerErcrecord component.final booleanIndicates whether some other object is "equal to" this one.static GrammarEncodingfrom(Grammar grammar, GrammarConfig config) Creates encoding plan from grammar and config.intReturns the value of thegenomeLengthrecord component.final inthashCode()Returns a hash code value for this object.intmaxDepth()Returns the value of themaxDepthrecord component.intmaxNodes()Returns the value of themaxNodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GrammarEncoding
public GrammarEncoding(int maxDepth, int maxNodes, int bitsPerDecision, int bitsPerErc, int genomeLength) Creates an instance of aGrammarEncodingrecord class.- Parameters:
maxDepth- the value for themaxDepthrecord componentmaxNodes- the value for themaxNodesrecord componentbitsPerDecision- the value for thebitsPerDecisionrecord componentbitsPerErc- the value for thebitsPerErcrecord componentgenomeLength- the value for thegenomeLengthrecord component
-
-
Method Details
-
from
Creates encoding plan from grammar and config. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
maxDepth
public int maxDepth()Returns the value of themaxDepthrecord component.- Returns:
- the value of the
maxDepthrecord component
-
maxNodes
public int maxNodes()Returns the value of themaxNodesrecord component.- Returns:
- the value of the
maxNodesrecord component
-
bitsPerDecision
public int bitsPerDecision()Returns the value of thebitsPerDecisionrecord component.- Returns:
- the value of the
bitsPerDecisionrecord component
-
bitsPerErc
public int bitsPerErc()Returns the value of thebitsPerErcrecord component.- Returns:
- the value of the
bitsPerErcrecord component
-
genomeLength
public int genomeLength()Returns the value of thegenomeLengthrecord component.- Returns:
- the value of the
genomeLengthrecord component
-