gov.nasa.javaGenes.graph
Class AddDirectedVertex
java.lang.Object
gov.nasa.javaGenes.core.ChildMaker
gov.nasa.javaGenes.graph.GraphMutation
gov.nasa.javaGenes.graph.AddDirectedVertex
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class AddDirectedVertex
- extends gov.nasa.javaGenes.graph.GraphMutation
Mutation operator to add a DirectedVertex by a DirectedEdge to a
random vertex in a DirectedGraph. Won't add DigitalOutput or DigitalInput vertices.
- See Also:
DirectedGraph
,
Serialized Form
Methods inherited from class gov.nasa.javaGenes.core.ChildMaker |
checkLastResults, checkResults, clearLast, getAndClearLastTabSeparatedResults, getFitnessFunctionNames, getLastTabSeparatedResults, headerFragment, makeChildren, mutate, neverUsed, proportionDown, results, setFitnessFunction, setFitnessFunctionNames, subClassMeasures, tabSeparatedResults, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
provider
protected VertexAndEdgeProvider provider
predicate
protected Predicate predicate
AddDirectedVertex
public AddDirectedVertex(VertexAndEdgeProvider p)
- Parameters:
p
- will be used to get the directed edges to be added to graphs
makeChild
public Graph makeChild(Graph c)
- Parameters:
c
- must be a DirectedGraph
- Returns:
- c with an added vertex/edge or null if a they can be added
numberOfParents
public int numberOfParents()
- Overrides:
numberOfParents
in class ChildMaker
- Returns:
- 1
makeChildren
public Evolvable[] makeChildren(Evolvable[] parents)
- Description copied from class:
ChildMaker
- Defaults to mutation, any subclass wanting more than one parent must over-ride. Mutators can over-ride mutate(Evovlable)
- Overrides:
makeChildren
in class ChildMaker
- Parameters:
parents
- the evolvables from which children will be created. By convention, the parents are not modified.
- Returns:
- the children created. Subclass must implement copyForEvolution()