/// <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; }
/// <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; }
/// <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; }
/// <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); }
/// <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); }