Table of Contents

Class MultiCompositeQuote

Namespace
NanoQL.Quotes
Assembly
NanoQL.dll

A quote whose value is a function of an array of other quotes' values: QuantLib's MultiCompositeQuote.

public sealed class MultiCompositeQuote
Inheritance
MultiCompositeQuote
Inherited Members

Remarks

Immutable: its value is computed once, at construction, from the elements' values, which the function receives as a new Vector (§2.2's quote row). QuantLib's quote recomputes when an element notifies it; here new element values are a new quote. QuantLib's isValid isn't ported: a value is always valid.

Constructors

MultiCompositeQuote(IEnumerable<double>, Func<Vector, double>)

Initializes a new instance of the MultiCompositeQuote class.

public MultiCompositeQuote(IEnumerable<double> elements, Func<Vector, double> f)

Parameters

elements IEnumerable<double>

The elements' values.

f Func<Vector, double>

The function of the values, given as a vector in the elements' order.

Exceptions

ArgumentNullException

elements or f is null.

Properties

Value

Gets the value: the function of the elements' values.

public double Value { get; }

Property Value

double

Methods

InputValue(int)

The value of an element.

public double InputValue(int i)

Parameters

i int

The element's index.

Returns

double

The element's value.

Exceptions

ArgumentOutOfRangeException

i isn't an element's index.