C# Class Cream.Variable

Variables. A variable is a component of a {@linkplain Network constraint network}. A variable is constructed with an initial {@linkplain Domain domain} which specifies the set of Elements over which the variable ranges. See {@link Network} for example programs to construct variables and Add them to a constraint network.
Inheritance: ICloneable
Show file Open project: kikoanis/CSharpCream Class Usage Examples

Public Methods

Method Description
ClearWatch ( ) : void
Clone ( ) : Object
IsModified ( ) : bool
SetWatch ( ) : void
ToString ( ) : String

Returns the name of this variable.

UpdateDomain ( Domain d, Trail trail ) : void

Updates the domain of the current variable with the parameter domain d after pushing the Trail trial

Variable ( Cream.Network net, Domain d ) : System

Constructs a variable of the network with an initial domain d and a default name. This constructor is equivalent to Variable(network, d, null).

Variable ( Cream.Network net, Domain d, String name ) : System

Constructs a variable of the network with an initial domain d and a name specified by the parameter name. When the parameter name is null, default names (v1, v2, and so on) are used.

Protected Methods

Method Description
ClearModified ( ) : void
Copy ( Cream.Network net ) : Variable

Creates a Copy of this variable for a new network.

SetModified ( ) : void

Method Details

ClearModified() protected method

protected ClearModified ( ) : void
return void

ClearWatch() public method

public ClearWatch ( ) : void
return void

Clone() public method

public Clone ( ) : Object
return Object

Copy() protected method

Creates a Copy of this variable for a new network.
protected Copy ( Cream.Network net ) : Variable
net Cream.Network
return Variable

IsModified() public method

public IsModified ( ) : bool
return bool

SetModified() protected method

protected SetModified ( ) : void
return void

SetWatch() public method

public SetWatch ( ) : void
return void

ToString() public method

Returns the name of this variable.
public ToString ( ) : String
return String

UpdateDomain() public method

Updates the domain of the current variable with the parameter domain d after pushing the Trail trial
public UpdateDomain ( Domain d, Trail trail ) : void
d Domain the domain to be updated with
trail Trail the trail to be pushed
return void

Variable() public method

Constructs a variable of the network with an initial domain d and a default name. This constructor is equivalent to Variable(network, d, null).
public Variable ( Cream.Network net, Domain d ) : System
net Cream.Network the network ///
d Domain the initial domain ///
return System

Variable() public method

Constructs a variable of the network with an initial domain d and a name specified by the parameter name. When the parameter name is null, default names (v1, v2, and so on) are used.
public Variable ( Cream.Network net, Domain d, String name ) : System
net Cream.Network the network ///
d Domain the initial domain ///
name String the name of the variable, or null for a default name ///
return System