Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
miscmaths
Commits
433217f8
Commit
433217f8
authored
6 months ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
ENH,RF: Implement clamped extrapolation boundary condition for coefficient initialisation
parent
197f9d63
No related branches found
No related tags found
1 merge request
!17
ENH: Allow `Splinterpolator` instances to be created from an existing set of spline coefficients, and extend extrapolation options
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
splinterpolator.h
+13
-2
13 additions, 2 deletions
splinterpolator.h
with
13 additions
and
2 deletions
splinterpolator.h
+
13
−
2
View file @
433217f8
...
...
@@ -1643,11 +1643,17 @@ double Splinterpolator<T>::SplineColumn::init_fwd_sweep(double z, ExtrapolationT
double
z2i
=
z
;
for
(
unsigned
int
i
=
1
;
i
<
n
;
i
++
,
ptr
--
,
z2i
*=
z
)
iv
+=
z2i
*
*
ptr
;
}
else
{
else
if
(
et
==
Mirror
)
{
double
*
ptr
=&
_col
[
1
];
double
z2i
=
z
;
for
(
unsigned
int
i
=
1
;
i
<
n
;
i
++
,
ptr
++
,
z2i
*=
z
)
iv
+=
z2i
*
*
ptr
;
}
// et == Constant || et == Zeros
else
{
double
*
ptr
=&
_col
[
0
];
double
z2i
=
z
;
for
(
unsigned
int
i
=
0
;
i
<
n
;
i
++
,
ptr
++
,
z2i
*=
z
)
iv
+=
z2i
*
*
ptr
;
}
return
(
iv
);
}
...
...
@@ -1674,9 +1680,14 @@ double Splinterpolator<T>::SplineColumn::init_bwd_sweep(double z, double lv, Ext
}
iv
/=
(
z2i
-
1.0
);
}
else
{
else
if
(
et
==
Mirror
)
{
iv
=
-
z
/
(
1.0
-
z
*
z
)
*
(
2.0
*
_col
[
_sz
-
1
]
-
lv
);
}
// et == Constant || et == Zeros
else
{
iv
=
z
/
(
z
-
1
)
*
_col
[
_sz
-
1
];
}
return
(
iv
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment