ValuesByIndex Class

Solver Foundation 3.0

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

Provides access to solver values by using INonlinearModel indexes.


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

public class ValuesByIndex

The ValuesByIndex type exposes the following members.

Protected methodValuesByIndex()Initializes a new instance of the ValuesByIndex class.
Public methodValuesByIndex(Int32[])Initializes a new instance of the ValuesByIndex class, using the specified mapping.
Public methodValuesByIndex(Int32[], Double[])Initializes a new instance of the ValuesByIndex class, using the specified mapping and values.

Public propertyItemGets or sets the value of a specified row or variable index.
Protected propertySolverValuesGets or sets an array of solver values to be used by derived classes.

Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Use ValuesByIndex to get and set values for the specified row or variable index. The following code example shows how to write values to the console.

// Code to retrieve v and x.
ValuesByIndex v; int x;
Console.WriteLine("The value for vid {0} is {1}", x, v[x]);

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.