Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ExactlyMofN Method

Model.ExactlyMofN Method

Solver Foundation 3.0

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Tests whether exactly a specified number of inputs are true.

Namespace:  Microsoft.SolverFoundation.Services
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

public static Term ExactlyMofN(
	int m,
	params Term[] terms
)

Parameters

m
Type: System.Int32
The number of inputs to test for.
terms
Type: Microsoft.SolverFoundation.Services.Term[]
A group of decisions, formulas, goals, or constraints to test.

Return Value

Type: Microsoft.SolverFoundation.Services.Term
1 if exactly m of the inputs are true (nonzero), 0 otherwise.

ExceptionCondition
ArgumentException

The operation is not valid for the given inputs.

Show:
© 2015 Microsoft