org.jgap.gp
Class GPProblem
- java.lang.Object
-
- org.jgap.gp.GPProblem
-
- Direct Known Subclasses:
- SymbolicRegression, SymProblem
public abstract class GPProblem extends java.lang.ObjectAbstract base class for all GP problems. See packages examples.gp and examples.grid for sample implementations.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor and Description GPProblem()Default constructor for dynamic instantiation.GPProblem(GPConfiguration a_conf)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract GPGenotypecreate()javax.swing.tree.TreeNodecreateTree(IGPProgram a_prog)Creates a tree out of a given GP program.GPConfigurationgetGPConfiguration()voidshowTree(IGPProgram a_prog, java.lang.String a_filename)Creates a graphical tree out of a given GP program and saves it to a file.voidshowTree(IGPProgram a_prog, java.lang.String a_filename, TreeBranchRenderer a_treeBranchRenderer, TreeNodeRenderer a_treeNodeRenderer)Creates a tree out of a given GP program and saves it to a file.
-
-
-
Constructor Detail
-
GPProblem
public GPProblem(GPConfiguration a_conf) throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
GPProblem
public GPProblem()
Default constructor for dynamic instantiation.- Since:
- 3.2
-
-
Method Detail
-
create
public abstract GPGenotype create() throws InvalidConfigurationException
- Returns:
- newly created GPGenotype
- Throws:
InvalidConfigurationException- Since:
- 3.0
-
showTree
public void showTree(IGPProgram a_prog, java.lang.String a_filename) throws InvalidConfigurationException
Creates a graphical tree out of a given GP program and saves it to a file.- Parameters:
a_prog- the GP program to visualize a tree fora_filename- the name of the file to save the tree in- Throws:
InvalidConfigurationException- Since:
- 3.0
-
showTree
public void showTree(IGPProgram a_prog, java.lang.String a_filename, TreeBranchRenderer a_treeBranchRenderer, TreeNodeRenderer a_treeNodeRenderer) throws InvalidConfigurationException
Creates a tree out of a given GP program and saves it to a file. Allows to preset the tree renderers.- Parameters:
a_prog- the GP program to visualize a tree fora_filename- the name of the file to save the tree ina_treeBranchRenderer- renderer for the tree's branchesa_treeNodeRenderer- renderer for the tree's nodes- Throws:
InvalidConfigurationException- Since:
- 3.0
-
createTree
public javax.swing.tree.TreeNode createTree(IGPProgram a_prog) throws InvalidConfigurationException
Creates a tree out of a given GP program.- Parameters:
a_prog- the GPGenotype to visualize a tree for- Returns:
- the TreeNode object corresponding to the GP program
- Throws:
InvalidConfigurationException- Since:
- 3.0
-
getGPConfiguration
public GPConfiguration getGPConfiguration()
- Returns:
- the GPConfiguration set
- Since:
- 3.0
-
-
DMelt 3.0 © DataMelt by jWork.ORG