pedviz.algorithms
Class GraphRepair

java.lang.Object
  extended by pedviz.algorithms.GraphRepair

public class GraphRepair
extends java.lang.Object

The automatic repair method fixes problems by changing the sex or adding virtual individuals (ID starts with ##).

Author:
Luki

Constructor Summary
GraphRepair()
           
 
Method Summary
static java.util.Vector<java.lang.String> insertMissingParents(Graph graph, java.lang.Object male, java.lang.Object female)
          Inserts missing parents and change invalid sex.
static java.util.Vector<java.lang.String> insertMissingParents(java.util.Vector<Graph> graphs)
          Inserts missing parents and change invalid sex.
static java.util.Vector<java.lang.String> insertMissingParents(java.util.Vector<Graph> graphs, java.lang.Object male, java.lang.Object female)
          Inserts missing parents and change invalid sex.
static java.util.Vector<java.lang.String> repair(Graph graph)
          Inserts missing parents and change invalid sex.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphRepair

public GraphRepair()
Method Detail

repair

public static java.util.Vector<java.lang.String> repair(Graph graph)
Inserts missing parents and change invalid sex.

Parameters:
graph - graph.
Returns:
list of changes.

insertMissingParents

public static java.util.Vector<java.lang.String> insertMissingParents(Graph graph,
                                                                      java.lang.Object male,
                                                                      java.lang.Object female)
Inserts missing parents and change invalid sex.

Parameters:
graph - graph
male - symbol for male (default "1")
female - symbol for female (default "2")
Returns:
list of changes.

insertMissingParents

public static java.util.Vector<java.lang.String> insertMissingParents(java.util.Vector<Graph> graphs)
Inserts missing parents and change invalid sex.

Parameters:
graphs - a collection of graphs.
Returns:
list of changes.

insertMissingParents

public static java.util.Vector<java.lang.String> insertMissingParents(java.util.Vector<Graph> graphs,
                                                                      java.lang.Object male,
                                                                      java.lang.Object female)
Inserts missing parents and change invalid sex.

Parameters:
graphs - a collection of graphs.
male - symbol for male (default "1")
female - symbol for female (default "2")
Returns:
list of changes.