Class Matching

java.lang.Object
  |
  +--Matching

public class Matching
extends java.lang.Object

Class controlling all the different states of matching-problem (this means mostly different states of webs...) It also provides services to WebUI class for getting information about simulated algorithms...

Version:
1.0 Created 21.3.2000 Last Modified 3.5.2000
Author:
Ilkka Lassila, Tero Karhunen

Constructor Summary
Matching()
          This constructor is defaultly used.
Matching(int non, int nlpn, int mnlpn)
          This constructor generates new GeneratedWeb, recycles it to RecycledWeb and solves the matching problem in SolvedWeb.
Matching(java.lang.String path)
          This constructor is used when user defines relations between given nodes.
 
Method Summary
 java.lang.String getAppletCode(boolean[][] mat)
          makes HTML-code for applet WebDrawer from given adjacencymatrix...
 long getDumbSolvingTime()
          Return time used to create a DumbSolvedWeb
 java.lang.String getHtmlTabledWeb(boolean[][] am)
          makes a HTML-table out of given adjacencymatrix...
 long getRecyclingTime()
          Return time used to create a RecycledWeb
 long getSmartSolvingTime()
          Return time used to create a SmartSolvedWeb
 long getStartingTime()
          Return time used to create a StartWeb
 boolean[][] getStartWebMatrix()
          Return startwebs adjacencymatrix ...
 long getTotalTime()
           
 boolean isDumbPerfect()
           
 boolean isSmartPerfect()
           
 boolean isSpecialCase()
          Returns boolean telling if the matching was a special case (which is a web that SmartSolvedWeb solved better than DumbSolvedWeb ...)
 java.lang.String resultsToString(boolean[][] rm)
          is used by methods smartResultsToString and dumbResultsToString to do the job ...
 java.lang.String simulate(int results)
          Returns HTML-code to WebUI for showing webs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Matching

public Matching(int non,
                int nlpn,
                int mnlpn)
         throws java.lang.Exception
This constructor generates new GeneratedWeb, recycles it to RecycledWeb and solves the matching problem in SolvedWeb.

Matching

public Matching(java.lang.String path)
         throws java.lang.Exception
This constructor is used when user defines relations between given nodes. It generates new ReadWeb, recycles it to RecycledWeb and solves the matching problem in two differend SolvedWebs (smart and dumb).

Matching

public Matching()
This constructor is defaultly used.
Method Detail

isDumbPerfect

public boolean isDumbPerfect()

isSmartPerfect

public boolean isSmartPerfect()

getTotalTime

public long getTotalTime()

getStartingTime

public long getStartingTime()
Return time used to create a StartWeb

getRecyclingTime

public long getRecyclingTime()
Return time used to create a RecycledWeb

getDumbSolvingTime

public long getDumbSolvingTime()
Return time used to create a DumbSolvedWeb

getSmartSolvingTime

public long getSmartSolvingTime()
Return time used to create a SmartSolvedWeb

simulate

public java.lang.String simulate(int results)
                          throws java.lang.Exception
Returns HTML-code to WebUI for showing webs. Parameter results defines information shown. Value 1 means "only results", value 2 means "results and adjacencymatrix", value 3 means "results and drawing" and value 4 means "results, adjacencymatrix and drawing"....

getStartWebMatrix

public boolean[][] getStartWebMatrix()
Return startwebs adjacencymatrix ...

isSpecialCase

public boolean isSpecialCase()
Returns boolean telling if the matching was a special case (which is a web that SmartSolvedWeb solved better than DumbSolvedWeb ...)

getAppletCode

public java.lang.String getAppletCode(boolean[][] mat)
makes HTML-code for applet WebDrawer from given adjacencymatrix...

getHtmlTabledWeb

public java.lang.String getHtmlTabledWeb(boolean[][] am)
makes a HTML-table out of given adjacencymatrix...

resultsToString

public java.lang.String resultsToString(boolean[][] rm)
is used by methods smartResultsToString and dumbResultsToString to do the job ...