Combined curve #1677
Merged
Combined curve #1677
Conversation
@PropertyDefinition(validate = "notNull") | ||
private final Curve spreadCurve; | ||
|
||
@PropertyDefinition(validate = "notNull", overrideGet = true) |
jodastephen
May 3, 2018
Member
Javadoc
Javadoc
// check value type | ||
if (!baseMetadata.getXValueType().equals(metadata.getXValueType())) { | ||
throw new IllegalArgumentException(Messages.format( | ||
"xValueTypee is {} in baseCurve, but {} in CombinedCurve", |
jodastephen
May 3, 2018
Member
Spelling
Spelling
} | ||
if (!spreadMetadata.getXValueType().equals(metadata.getXValueType())) { | ||
throw new IllegalArgumentException(Messages.format( | ||
"xValueTypee is {} in spreadCurve, but {} in CombinedCurve", |
jodastephen
May 3, 2018
Member
Spelling
Spelling
} | ||
if (!baseMetadata.getYValueType().equals(metadata.getYValueType())) { | ||
throw new IllegalArgumentException(Messages.format( | ||
"yValueTypee is {} in baseCurve, but {} in CombinedCurve", |
jodastephen
May 3, 2018
Member
Spelling
Spelling
} | ||
if (!spreadMetadata.getYValueType().equals(metadata.getYValueType())) { | ||
throw new IllegalArgumentException(Messages.format( | ||
"yValueTypee is {} in spreadCurve, but {} in CombinedCurve", |
jodastephen
May 3, 2018
Member
Spelling
Spelling
baseCurve.withParameter(parameterIndex, newValue), | ||
spreadCurve, | ||
metadata); | ||
|
jodastephen
May 3, 2018
Member
Remove blank line
Remove blank line
if (curveIndex == 0) { | ||
return curve; | ||
} | ||
return this; |
jodastephen
May 3, 2018
Member
I think it would be better to throw an exception (Javadoc change too)
I think it would be better to throw an exception (Javadoc change too)
* @param curve the new split curve | ||
* @return the new curve | ||
*/ | ||
public default Curve withUnderlyingCurve(int curveIndex, Curve curve) { |
jodastephen
May 3, 2018
Member
Does these methods not need to be implemented anywhere else? Like AddFixedCurve
?
Does these methods not need to be implemented anywhere else? Like AddFixedCurve
?
jodastephen
added a commit
that referenced
this pull request
May 11, 2018
* combined curve * addressed review comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
split
andwithUnderlyingCurve
methods to the interface. These will be used curve gamma calculation with the combined curve.