DRCL J-Sim API

drcl.net.graph
Class Relaxer

java.lang.Object
  extended bydrcl.net.graph.Relaxer

public class Relaxer
extends java.lang.Object

Given a graph, iterates to get to the equilibrium point where forces by edge length and "push" by nodes are balanced.


Field Summary
static int HORIZONTAL
           
static int VERTICAL
           
 
Constructor Summary
Relaxer()
           
Relaxer(Graph g_, int width_, int height_, int times_, long seed_)
           
 
Method Summary
 void config(Graph graph_, int width_, int height_, int times_, long seed_)
           
 void config(int width_, int height_)
           
 void doit()
           
 void excludeStub()
           
 double getDampingRatio()
           
 double getStep()
           
 void includeStub()
           
 java.lang.String parameter()
           
 void reset()
           
 void setDampingRatio(double ratio_)
           
 void setRandom(boolean random_)
           
 void setStep(double step_)
           
 void setWallPref(int nodeID_, int wall_, int pref_)
          Sets wall preference for nodeID_.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERTICAL

public static final int VERTICAL
See Also:
Constant Field Values

HORIZONTAL

public static final int HORIZONTAL
See Also:
Constant Field Values
Constructor Detail

Relaxer

public Relaxer()

Relaxer

public Relaxer(Graph g_,
               int width_,
               int height_,
               int times_,
               long seed_)
Method Detail

setWallPref

public void setWallPref(int nodeID_,
                        int wall_,
                        int pref_)
Sets wall preference for nodeID_. Larger value, higher preference. Valid values: 0-16383. wall_ must be one of {0, 1}, corresponding to horizontal, vertical.


config

public void config(Graph graph_,
                   int width_,
                   int height_,
                   int times_,
                   long seed_)

config

public void config(int width_,
                   int height_)

excludeStub

public void excludeStub()

includeStub

public void includeStub()

reset

public void reset()

parameter

public java.lang.String parameter()

setRandom

public void setRandom(boolean random_)

doit

public void doit()

getStep

public double getStep()

setStep

public void setStep(double step_)

getDampingRatio

public double getDampingRatio()

setDampingRatio

public void setDampingRatio(double ratio_)

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~