Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

Samples:

	- Spline Grid Aggregate Span - Calculate Response Value Derivative (1, 2, 3)
	- Spline Grid Aggregate Span - Is Merge State (4, 5)
	- Spline Grid Aggregate Span - Jack Response D Manifest Measure (6, 7, 8)
	- Spline Grid Aggregate Span - In (9, 10)
	- Spline Grid Aggregate Span - Display String (11, 12, 13)
	- Spline Multidimensional Wire Surface Stretch (14, 15, 16)
	- Spline Multidimensional Wire Surface Stretch - Segment Custom Builder Control (17)
	- Spline Multidimensional Wire Surface Stretch - Span Map (18)
	- Spline Multidimensional Wire Surface Stretch - Constructor (19, 20, 21)
	- Spline Multidimensional Wire Surface Stretch - Response Value (22, 23, 24)
	- Spline Multidimensional Wire Surface Stretch - Span Y Anchor (25, 26, 27)
	- Spline Multidimensional Wire Surface Stretch - Span X Anchor (28, 29, 30)
	- Spline Multidimensional Wire Surface Piecewise Constant (31, 32, 33)
	- Spline Multidimensional Wire Surface Piecewise Constant - X Array (34)
	- Spline Multidimensional Wire Surface Piecewise Constant - Y Array (35)
	- Spline Multidimensional Wire Surface Piecewise Constant - Response Grid (36)
	- Spline Multidimensional Wire Surface Piecewise Constant - Constructor (37, 38, 39)
	- Spline Multidimensional Wire Surface Piecewise Constant - Enclosing X Index (40, 41, 42)
	- Spline Multidimensional Wire Surface Piecewise Constant - Enclosing Y Index (43, 44, 45)
	- Spline Multidimensional Wire Surface Piecewise Constant - Response Value (46, 47, 48)
	- Spline Params Stretch Best Fit Response (49, 50, 51)
	- Spline Params Stretch Best Fit Response - Weight Array (52)
	- Spline Params Stretch Best Fit Response - Array (53)
	- Spline Params Stretch Best Fit Response - Predictor Ordinate Array (54)
	- Spline Params Stretch Best Fit Response - Create #1 (55, 56, 57)
	- Spline Params Stretch Best Fit Response - Create #2 (58, 59, 60)


IdeaDRIP:
  • Loading branch information
Lakshmik committed Jan 7, 2024
1 parent e795e8d commit 7b3dfad
Show file tree
Hide file tree
Showing 6 changed files with 483 additions and 329 deletions.
36 changes: 36 additions & 0 deletions ReleaseNotes/04_17_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Features:

Bug Fixes/Re-organization:

Samples:

- Spline Grid Aggregate Span - Calculate Response Value Derivative (1, 2, 3)
- Spline Grid Aggregate Span - Is Merge State (4, 5)
- Spline Grid Aggregate Span - Jack Response D Manifest Measure (6, 7, 8)
- Spline Grid Aggregate Span - In (9, 10)
- Spline Grid Aggregate Span - Display String (11, 12, 13)
- Spline Multidimensional Wire Surface Stretch (14, 15, 16)
- Spline Multidimensional Wire Surface Stretch - Segment Custom Builder Control (17)
- Spline Multidimensional Wire Surface Stretch - Span Map (18)
- Spline Multidimensional Wire Surface Stretch - Constructor (19, 20, 21)
- Spline Multidimensional Wire Surface Stretch - Response Value (22, 23, 24)
- Spline Multidimensional Wire Surface Stretch - Span Y Anchor (25, 26, 27)
- Spline Multidimensional Wire Surface Stretch - Span X Anchor (28, 29, 30)
- Spline Multidimensional Wire Surface Piecewise Constant (31, 32, 33)
- Spline Multidimensional Wire Surface Piecewise Constant - X Array (34)
- Spline Multidimensional Wire Surface Piecewise Constant - Y Array (35)
- Spline Multidimensional Wire Surface Piecewise Constant - Response Grid (36)
- Spline Multidimensional Wire Surface Piecewise Constant - Constructor (37, 38, 39)
- Spline Multidimensional Wire Surface Piecewise Constant - Enclosing X Index (40, 41, 42)
- Spline Multidimensional Wire Surface Piecewise Constant - Enclosing Y Index (43, 44, 45)
- Spline Multidimensional Wire Surface Piecewise Constant - Response Value (46, 47, 48)
- Spline Params Stretch Best Fit Response (49, 50, 51)
- Spline Params Stretch Best Fit Response - Weight Array (52)
- Spline Params Stretch Best Fit Response - Array (53)
- Spline Params Stretch Best Fit Response - Predictor Ordinate Array (54)
- Spline Params Stretch Best Fit Response - Create #1 (55, 56, 57)
- Spline Params Stretch Best Fit Response - Create #2 (58, 59, 60)


IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
85 changes: 51 additions & 34 deletions src/main/java/org/drip/spline/grid/AggregatedSpan.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

import java.util.List;

import org.drip.numerical.differentiation.WengertJacobian;
import org.drip.spline.stretch.MultiSegmentSequence;
import org.drip.state.identifier.LatentStateLabel;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
Expand Down Expand Up @@ -212,75 +214,90 @@ public AggregatedSpan (
}

@Override public double calcResponseValueDerivative (
final double dblPredictorOrdinate,
final int iOrder)
throws java.lang.Exception
final double predictorOrdinate,
final int order)
throws Exception
{
int i = 0;
double dblResponseValueDerivative = 0.;
double responseValueDerivative = 0.;

for (org.drip.spline.grid.Span span : _spanList)
dblResponseValueDerivative += span.calcResponseValueDerivative (dblPredictorOrdinate,iOrder) *
for (Span span : _spanList) {
responseValueDerivative += span.calcResponseValueDerivative (predictorOrdinate, order) *
_weightList.get (i++);
}

return dblResponseValueDerivative;
return responseValueDerivative;
}

@Override public boolean isMergeState (
final double dblPredictorOrdinate,
final org.drip.state.identifier.LatentStateLabel lsl)
final double predictorOrdinate,
final LatentStateLabel latentStateLabel)
{
for (org.drip.spline.grid.Span span : _spanList) {
if (span.isMergeState (dblPredictorOrdinate, lsl)) return true;
for (Span span : _spanList) {
if (span.isMergeState (predictorOrdinate, latentStateLabel)) {
return true;
}
}

return false;
}

@Override public org.drip.numerical.differentiation.WengertJacobian jackDResponseDManifestMeasure (
final java.lang.String strManifestMeasure,
final double dblPredictorOrdinate,
final int iOrder)
@Override public WengertJacobian jackDResponseDManifestMeasure (
final String manifestMeasure,
final double predictorOrdinate,
final int order)
{
int i = 0;
org.drip.numerical.differentiation.WengertJacobian wjAggregate = null;

for (org.drip.spline.grid.Span span : _spanList) {
org.drip.numerical.differentiation.WengertJacobian wj = span.jackDResponseDManifestMeasure
(strManifestMeasure, dblPredictorOrdinate, iOrder);
WengertJacobian aggregateWengertJacobian = null;

if (null == wj) return null;
for (Span span : _spanList) {
WengertJacobian wengertJacobian = span.jackDResponseDManifestMeasure (
manifestMeasure,
predictorOrdinate,
order
);

if (null == wengertJacobian) {
return null;
}

if (null == wjAggregate) {
if (!(wjAggregate = wj).scale (_weightList.get (i++))) return null;
if (null == aggregateWengertJacobian) {
if (!(aggregateWengertJacobian = wengertJacobian).scale (_weightList.get (i++))) {
return null;
}
} else {
if (!wjAggregate.cumulativeMerge (wj, _weightList.get (i++))) return null;
if (!aggregateWengertJacobian.cumulativeMerge (wengertJacobian, _weightList.get (i++))) {
return null;
}
}
}

return wjAggregate;
return aggregateWengertJacobian;
}

@Override public boolean in (
final double dblPredictorOrdinate)
throws java.lang.Exception
final double predictorOrdinate)
throws Exception
{
for (org.drip.spline.grid.Span span : _spanList) {
if (span.in (dblPredictorOrdinate)) return true;
for (Span span : _spanList) {
if (span.in (predictorOrdinate)) {
return true;
}
}

return false;
}

@Override public java.lang.String displayString()
@Override public String displayString()
{
int i = 0;

java.lang.StringBuffer sb = new java.lang.StringBuffer();
StringBuffer stringBuffer = new StringBuffer();

for (org.drip.spline.grid.Span span : _spanList)
sb.append (span.displayString() + " | " + _weightList.get (i++));
for (Span span : _spanList) {
stringBuffer.append (span.displayString() + " | " + _weightList.get (i++));
}

return sb.toString();
return stringBuffer.toString();
}
}
Loading

0 comments on commit 7b3dfad

Please sign in to comment.