java.lang.Object
de.uka.ipd.sdq.dsexplore.bayesnets.utility.BayesEdge

public class BayesEdge extends Object
Contains utilities to make changes to edges of a Bayesian Network. With this class, you can add, remove or reverse an edge between any two nodes in the Bayesian Network.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int[][]
    addEdge(int[][] Graph, int FromNode, int ToNode)
    Adds an edge between node FromNode to node ToNode.
    static void
    main(String[] args)
     
    int[][]
    removeEdge(int[][] Graph, int FromNode, int ToNode)
    Removes an edge between node FromNode to node ToNode.
    int[][]
    reverseEdge(int[][] Graph, int FromNode, int ToNode)
    Reverses an edge between node FromNode to node ToNode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BayesEdge

      public BayesEdge()
  • Method Details

    • main

      public static void main(String[] args)
    • addEdge

      public int[][] addEdge(int[][] Graph, int FromNode, int ToNode)
      Adds an edge between node FromNode to node ToNode. Note that the edge is directed and originates from FromNode and goes to ToNode.
      Parameters:
      int - [][] Graph - The Bayesian network graph represented as a Adjacency matrix.
      int - FromNode - An integer value specifying the originating node
      int - ToNode - An integer value specifying the target node
      Returns:
      The revised int[][] matrix representing the Graph. This is stored in a different memory location than the input int[][] Graph
    • removeEdge

      public int[][] removeEdge(int[][] Graph, int FromNode, int ToNode)
      Removes an edge between node FromNode to node ToNode. Note that this method removes the edge which is directed and originates from FromNode and goes to ToNode. If no such directed edge exists, then the method prints out the appropriate message.
      Parameters:
      int - [][] Graph - The Bayesian network graph represented as a Adjacency matrix.
      int - FromNode - An integer value specifying the originating node
      int - ToNode - An integer value specifying the target node
      Returns:
      The revised int[][] matrix representing the Graph. This is stored in a different memory location than the input int[][] Graph
    • reverseEdge

      public int[][] reverseEdge(int[][] Graph, int FromNode, int ToNode)
      Reverses an edge between node FromNode to node ToNode. If no such edge exists, then the appropriate message is displayed.
      Parameters:
      int - [][] Graph - The Bayesian network graph represented as a Adjacency matrix.
      int - FromNode - An integer value specifying the originating node
      int - ToNode - An integer value specifying the target node
      Returns:
      The revised int[][] matrix representing the Graph. This is stored in a different memory location than the input int[][] Graph