Share via


ValuesByIndex Class

[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.

Inheritance Hierarchy

System.Object
  Microsoft.SolverFoundation.Services.ValuesByIndex

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

Syntax

'Declaration
Public Class ValuesByIndex
public class ValuesByIndex
public ref class ValuesByIndex
type ValuesByIndex =  class end
public class ValuesByIndex

The ValuesByIndex type exposes the following members.

Constructors

  Name Description
Protected method ValuesByIndex() Initializes a new instance of the ValuesByIndex class.
Public method ValuesByIndex(Int32()) Initializes a new instance of the ValuesByIndex class, using the specified mapping.
Public method ValuesByIndex(Int32(), array<Double[]) Initializes a new instance of the ValuesByIndex class, using the specified mapping and values.

Top

Properties

  Name Description
Public property Item Gets or sets the value of a specified row or variable index.
Protected property SolverValues Gets or sets an array of solver values to be used by derived classes.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

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]);

Thread Safety

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

See Also

Reference

Microsoft.SolverFoundation.Services Namespace