Documentation of 'org.jgap.data.DataTreeBuilder' Java class
DataTreeBuilder
org.jgap.data

Class DataTreeBuilder



  • public class DataTreeBuilder
    extends java.lang.Object
    Builds a tree structure from Genes, Chrosomes or from a Genotype.

    Generated result is generic data type usable for concrete persistence strategies, including XML documents, writing an object to a file or stream etc.

    Since:
    2.0
    • Method Detail

      • getInstance

        public static DataTreeBuilder getInstance()
        Returns:
        the singleton instance of this class
        Since:
        2.0
      • representGenotypeAsDocument

        public IDataCreators representGenotypeAsDocument(Genotype a_subject)
                                                  throws java.lang.Exception
        Represent a Genotype as a generic data document, including its population of Chromosome instances.
        Parameters:
        a_subject - the genotype to represent
        Returns:
        a generic document object representing the given Genotype
        Throws:
        java.lang.Exception
        Since:
        2.0
      • representGenotypeAsElement

        public IDataElement representGenotypeAsElement(Genotype a_subject)
                                                throws java.lang.Exception
        Represent a Genotype as a generic data element, including its population of Chromosome instances. This may be useful in scenarios where representation as an entire document is undesirable, such as when the representation of this Genotype is to be combined with other elements in a single document.
        Parameters:
        a_subject - the genotype to represent
        Returns:
        an element object representing the given Genotype
        Throws:
        java.lang.Exception
        Since:
        2.0
      • representChromosomeAsDocument

        public IDataCreators representChromosomeAsDocument(IChromosome a_subject)
                                                    throws java.lang.Exception
        Represent a Chromosome as a generic data type document, including its contained Gene instances.
        Parameters:
        a_subject - the chromosome to represent
        Returns:
        a document object representing the given Chromosome
        Throws:
        java.lang.Exception
        Since:
        2.0
      • representChromosomeAsElement

        public IDataElement representChromosomeAsElement(IChromosome a_subject)
                                                  throws java.lang.Exception
        Represent a Chromosome as a generic data element, including its contained Gene instances. This may be useful in scenarios where representation as an entire document is undesirable, such as when the representation of this Chromosome is to be combined with other elements in a single document.
        Parameters:
        a_subject - the chromosome to represent
        Returns:
        an element object representing the given Chromosome
        Throws:
        java.lang.Exception
        Since:
        2.0
      • representGenesAsElement

        public IDataElement representGenesAsElement(Gene[] a_geneValues)
                                             throws java.lang.Exception
        Represent Genes as a generic data type element.
        Parameters:
        a_geneValues - the genes to represent
        Returns:
        an element object representing the given genes
        Throws:
        java.lang.Exception
        Since:
        2.0
      • representGeneAsElement

        public IDataElement representGeneAsElement(Gene a_gene)
                                            throws java.lang.Exception
        Represent a Gene as a generic data element.
        Parameters:
        a_gene - the Gene to represent
        Returns:
        an element object representing the given gene
        Throws:
        java.lang.Exception
        Since:
        2.0

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.