weka.gui.graphvisualizer
Class GraphNode

java.lang.Object
  extended byweka.gui.graphvisualizer.GraphNode
All Implemented Interfaces:
GraphConstants

public class GraphNode
extends java.lang.Object
implements GraphConstants

This class represents a node in the Graph.

Version:
1.0 - 23 Apr 2003 - Initial version (Ashraf M. Kibriya)
Author:
Ashraf M. Kibriya (amk14@cs.waikato.ac.nz)

Field Summary
(package private)  int[][] edges
          The indices of nodes to which there are edges from this node, plus the type of edge
(package private)  java.lang.String ID
          ID and label for the node
(package private)  java.lang.String lbl
          ID and label for the node
(package private)  int nodeType
          Type of node.
(package private)  java.lang.String[] outcomes
          The outcomes for the given node
(package private)  int[] prnts
          The indices of parent nodes
(package private)  double[][] probs
          probability table for each outcome given outcomes of parents, if any
(package private)  int x
          The x and y position of the node
(package private)  int y
          The x and y position of the node
 
Fields inherited from interface weka.gui.graphvisualizer.GraphConstants
DIRECTED, DOUBLE, NORMAL, PLURAL_DUMMY, REVERSED, SINGULAR_DUMMY
 
Constructor Summary
GraphNode(java.lang.String id, java.lang.String label)
          Constructor
GraphNode(java.lang.String id, java.lang.String label, int type)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object n)
          Returns true if passed in argument is an instance of GraphNode and is equal to this node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

java.lang.String ID
ID and label for the node


lbl

java.lang.String lbl
ID and label for the node


outcomes

java.lang.String[] outcomes
The outcomes for the given node


probs

double[][] probs
probability table for each outcome given outcomes of parents, if any


x

int x
The x and y position of the node


y

int y
The x and y position of the node


prnts

int[] prnts
The indices of parent nodes


edges

int[][] edges
The indices of nodes to which there are edges from this node, plus the type of edge


nodeType

int nodeType
Type of node. Default is Normal node type

Constructor Detail

GraphNode

public GraphNode(java.lang.String id,
                 java.lang.String label)
Constructor


GraphNode

public GraphNode(java.lang.String id,
                 java.lang.String label,
                 int type)
Constructor

Method Detail

equals

public boolean equals(java.lang.Object n)
Returns true if passed in argument is an instance of GraphNode and is equal to this node. Implemented to enable the use of contains method in Vector/FastVector class.