示例#1
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net, ConstraintTypes cType)
 {
     Network = net;
     Index = -1;
     Network.ADD(this);
     CType = cType;
 }
示例#2
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net)
 {
     Network = net;
     Index = -1;
     Network.ADD(this);
     CType = ConstraintTypes.Hard;
 }
示例#3
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net, ConstraintTypes cType)
 {
     Network = net;
     Index   = -1;
     Network.ADD(this);
     CType = cType;
 }
示例#4
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net)
 {
     Network = net;
     Index   = -1;
     Network.ADD(this);
     CType = ConstraintTypes.Hard;
 }
示例#5
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net, ConstraintTypes cType, int weight)
 {
     Network = net;
     Index = -1;
     Weight = weight;
     Network.ADD(this);
     CType = cType;
 }
示例#6
0
 /// <summary> Constructor.
 /// (for invocation by subclass constructors, typically implicit)
 /// </summary>
 protected internal Constraint(Network net, ConstraintTypes cType, int weight)
 {
     Network = net;
     Index   = -1;
     Weight  = weight;
     Network.ADD(this);
     CType = cType;
 }
示例#7
0
 /// <summary> Constructs a variable of the network
 /// with an initial domain <tt>d</tt>
 /// and a name specified by the parameter <tt>name</tt>.
 /// When the parameter <tt>name</tt> is <tt>null</tt>,
 /// default names (<tt>v1</tt>, <tt>v2</tt>, and so on) are used.
 /// </summary>
 /// <param name="net">the network
 /// </param>
 /// <param name="d">the initial domain
 /// </param>
 /// <param name="name">the name of the variable, or <tt>null</tt> for a default name
 /// </param>
 public Variable(Network net, Domain d, String name)
 {
     Network = net;
     Domain = d;
     _modified = true;
     _watch = false;
     Name = name ?? "v" + (_count++);
     Network.ADD(this);
 }
示例#8
0
 /// <summary> Constructs a variable of the network
 /// with an initial domain <tt>d</tt>
 /// and a name specified by the parameter <tt>name</tt>.
 /// When the parameter <tt>name</tt> is <tt>null</tt>,
 /// default names (<tt>v1</tt>, <tt>v2</tt>, and so on) are used.
 /// </summary>
 /// <param name="net">the network
 /// </param>
 /// <param name="d">the initial domain
 /// </param>
 /// <param name="name">the name of the variable, or <tt>null</tt> for a default name
 /// </param>
 public Variable(Network net, Domain d, String name)
 {
     Network  = net;
     Domain   = d;
     modified = true;
     watch    = false;
     Name     = name ?? "v" + (Count++);
     Network.ADD(this);
 }