Jedit 4.2

edu.bsu.cs.algorithm
Class HavelHakimi

java.lang.Object
  extended by edu.bsu.cs.algorithm.Algorithm
      extended by edu.bsu.cs.algorithm.HavelHakimi

public class HavelHakimi
extends Algorithm

Since:
04 Jan 2003
Version:
02 Feb 2003
Author:
Elizabeth VandenBerg
See Also:
Algorithm

Constructor Summary
HavelHakimi()
          Default HavelHakimi constructor.
 
Method Summary
 boolean adjacencyHavelHakimi(int[] degSeq, double[][] aMat)
           
 void callOwnConstructor(JavaGraph jG, Vector sequenceVector, Vector animation)
          Implementation of the Havel-Hakimi algorithm.
static void sort_ascending(int[][] a, int sort_key)
           
static void sort_descending(int[][] a, int sort_key)
           
 
Methods inherited from class edu.bsu.cs.algorithm.Algorithm
getCode, getDescription, getName, getType, parseTextInput, setCode, setDescription, setFromResources, setName, setType, succeeded, succeeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HavelHakimi

public HavelHakimi()
Default HavelHakimi constructor. Sets internal private values with the following defaults:
success = false
code = this.getClass().getName()
type = JeditPanel.TEXTINPUTALGORITHM
name = using the class name to determine a key, the name is obtained using that key from the jedit.properties file
description = using the class name to determine a key, the description is obtained using that key from the jedit.properties file

Method Detail

callOwnConstructor

public void callOwnConstructor(JavaGraph jG,
                               Vector sequenceVector,
                               Vector animation)
Implementation of the Havel-Hakimi algorithm. Starts by calling the default HavelHakimi constructor.

Specified by:
callOwnConstructor in class Algorithm
Parameters:
jG - the edu.bsu.cs.graph.JavaGraph that the algorithm is performed on
sequenceVector - a Vector of inputs that consists of
  • An Integer, if the algorithm uses a single vertex as a starting point
  • Two Integers if the algorithm uses two vertices as starting points
  • A String if the algorithm starts off of typed input
  • Nothing if the algorithm runs automatically on a graph
animation - a Vector that is filled with AnimObjects as the algorithm proceeds. It must be instantiated before this method is called.

adjacencyHavelHakimi

public boolean adjacencyHavelHakimi(int[] degSeq,
                                    double[][] aMat)

sort_descending

public static void sort_descending(int[][] a,
                                   int sort_key)

sort_ascending

public static void sort_ascending(int[][] a,
                                  int sort_key)

Jedit 4.2