Class MultiCompositeQuote
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
elementsIEnumerable<double>The elements' values.
fFunc<Vector, double>The function of the values, given as a vector in the elements' order.
Exceptions
- ArgumentNullException
elementsorfis null.
Properties
Value
Gets the value: the function of the elements' values.
public double Value { get; }
Property Value
Methods
InputValue(int)
The value of an element.
public double InputValue(int i)
Parameters
iintThe element's index.
Returns
- double
The element's value.
Exceptions
- ArgumentOutOfRangeException
iisn't an element's index.