trace
Class Visualizer

java.lang.Object
  extended by trace.Visualizer
Direct Known Subclasses:
BinPacking, BoolChanneling, Cumulative, DomainMatrix, Element, Gcc, Inverse, LexLe, LexLt, Vector

public abstract class Visualizer
extends Object

An abstract class to define a visulaizer. this defines a constraint and variable visualizer, and its states are logged in the visualization xml file.


Since:
9 d�c. 2010
Author:
Charles Prud'homme

Field Summary
protected  String display
           
protected  String group
           
protected  int height
           
protected  int id
           
protected  int max
           
protected  int min
           
protected  String type
           
protected  int width
           
protected static Writer writer
           
protected  int x
           
protected  int y
           
 
Constructor Summary
protected Visualizer(String type, String display, int width, int height)
          Build a visualizer
protected Visualizer(String type, String display, int x, int y, int width, int height, String group, int min, int max)
          Build a visualizer
 
Method Summary
 String getDisplay()
          Return the display policy
 String getGroup()
          Return the group name of this
 int getHeight()
          Return the height of this in the visualizers window (default is 500)
 int getId()
          Returns the identifier of this
 String getType()
          Return the type of this
 int getWidth()
          Return the width of this in the visualisers window (default is 500)
protected  String options()
           
protected abstract  void print(org.slf4j.Logger logger, boolean focus, IntBranchingDecision decision)
           
 void setGroup(String group)
          Set a group name for this
protected  void setId(int id)
          Set the identifier of this
 void setMinMax(int min, int max)
          Set the expected minimal (resp. maximal) value of any of the domains
 void setXY(int x, int y)
          Set the coordinates of this in the visualizers window (default is [0,0])
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected static Writer writer

id

protected int id

type

protected final String type

display

protected final String display

x

protected int x

y

protected int y

width

protected final int width

height

protected final int height

group

protected String group

min

protected int min

max

protected int max
Constructor Detail

Visualizer

protected Visualizer(String type,
                     String display,
                     int width,
                     int height)
Build a visualizer

Parameters:
type - type of visualizer, must be supported in both sizes
display - "expanded" or "compact"
width - width of the visualizer
height - height of the visualizer

Visualizer

protected Visualizer(String type,
                     String display,
                     int x,
                     int y,
                     int width,
                     int height,
                     String group,
                     int min,
                     int max)
Build a visualizer

Parameters:
type - type of visualizer, must be supported in both sizes
display - "expanded" or "compact"
x - coordinate of the visualizer in the x-axis (horizontal)
y - coordinate of the visualizer in the y-axis (vertical)
width - width of the visualizer
height - height of the visualizer
group - group name (to group multiple constraints)
min - expected minimal value of any of the domains
max - expected maximal value of any of the domains
Method Detail

setId

protected void setId(int id)
Set the identifier of this

Parameters:
id - identifier

getId

public int getId()
Returns the identifier of this

Returns:
the identifier

setXY

public void setXY(int x,
                  int y)
Set the coordinates of this in the visualizers window (default is [0,0])

Parameters:
x - coordinate on the x-axis (horizontal)
y - coordinate on the y-axis (vertical)

setGroup

public void setGroup(String group)
Set a group name for this

Parameters:
group - name of the group

getGroup

public String getGroup()
Return the group name of this

Returns:
group name

getType

public String getType()
Return the type of this

Returns:
type

getDisplay

public String getDisplay()
Return the display policy

Returns:
diplay ploicy

getWidth

public int getWidth()
Return the width of this in the visualisers window (default is 500)

Returns:
the width

getHeight

public int getHeight()
Return the height of this in the visualizers window (default is 500)

Returns:
the height

setMinMax

public void setMinMax(int min,
                      int max)
Set the expected minimal (resp. maximal) value of any of the domains

Parameters:
min - minimal value
max - maximal value

options

protected String options()

print

protected abstract void print(org.slf4j.Logger logger,
                              boolean focus,
                              IntBranchingDecision decision)


Copyright © 2012. All Rights Reserved.