MathProgExtensionsHasSameElementsExceptParent Method

Finalizes the set builder and returns the resulting set.

The set generates exactly the elements of the dependent set except for its value.

For instance, consider the following sets.

C#
Set i = Set("i").Represents("node").HasElementsUntil(3);
Set j = Set("j").Represents("node except for i").DependsOn(i).HasSameElementsExceptParent();

Set i has elements { 0, 1, 2 }.

Set j depends on set i; hence, has different elements for different values of i:

  • when i=0; j has elements { 1, 2 },
  • when i=1; j has elements { 0, 2 },
  • when i=2; j has elements { 0, 1 }.

Definition

Namespace: Orx.MathProg
Assembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
C#
public static Set HasSameElementsExceptParent(
	this SetBuilderDepends<Dimension1> state
)

Parameters

state  SetBuilderDependsDimension1
Current state of the set builder.

Return Value

Set

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SetBuilderDependsDimension1. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also