-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02239ae
commit c59e5ca
Showing
882 changed files
with
61,518 additions
and
95,265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
Splines |Build Status| |View Splines on File Exchange| | ||
====================================================== | ||
|
||
Introduction | ||
------------ | ||
|
||
``Splines`` is a set of C++ classes (with MATLAB mex interface) which | ||
implements varios spline interpolation. | ||
|
||
Matlab Toolbox | ||
-------------- | ||
|
||
To use in MATLAB install the toolbox ``Splines.mltbx`` then compile the | ||
files running ``CompileSplinesLib`` (available at the | ||
`link <https://github.com/ebertolazzi/Splines/releases>`__) | ||
|
||
C++ Usage | ||
--------- | ||
|
||
The usage is simple: | ||
|
||
.. code:: cpp | ||
#include "Splines.hh" | ||
using namespace SplinesLoad; | ||
// .... | ||
CubicSpline spline; | ||
double x[] = {1,2,3,4}; | ||
double y[] = {3,1,1,3}; | ||
spline.build(x,y,4); // build a cubic spline with 4 points | ||
cout << spline(1.1) << '\n'; // spline at x = 1.1 | ||
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
splines can be built incrementally | ||
|
||
.. code:: cpp | ||
#include "Splines.hh" | ||
using namespace SplinesLoad; | ||
// .... | ||
CubicSpline spline; | ||
spline . pushBack( 1, 3 ); | ||
spline . pushBack( 2, 1 ); | ||
spline . pushBack( 3, 1 ); | ||
spline . pushBack( 4, 3 ); | ||
spline . build(); | ||
cout << spline(1.1) << '\n'; // spline at x = 1.1 | ||
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
or by using standard vector | ||
|
||
.. code:: cpp | ||
#include "Splines.hh" | ||
#include <vector> | ||
using namespace SplinesLoad; | ||
using namespace std; | ||
// .... | ||
CubicSpline spline; | ||
std::vector x, y; | ||
x.push_back(1); y.push_back(3); | ||
x.push_back(2); y.push_back(1); | ||
x.push_back(3); y.push_back(1); | ||
x.push_back(4); y.push_back(3); | ||
spline . build(x,y); | ||
cout << spline(1.1) << '\n'; // spline at x = 1.1 | ||
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
Compile and tests | ||
----------------- | ||
|
||
**Using makefile** | ||
|
||
Edit makefile file to match compiler of your OS and do: | ||
|
||
.. code:: sh | ||
make | ||
**Using rakefile** | ||
|
||
.. code:: sh | ||
rake build_win # on windows | ||
rake build_linux # on linux | ||
rake build_osx # on mac | ||
To run the test | ||
|
||
.. code:: sh | ||
make run # using makefile | ||
rake run # using rake on linux and osx | ||
rake run_win # using rake on windows | ||
Online Documentation | ||
-------------------- | ||
|
||
Available at: http://ebertolazzi.github.io/Splines | ||
|
||
Developer | ||
--------- | ||
|
||
| Enrico Bertolazzi | ||
| Dipartimento di Ingegneria Industriale | ||
| Università degli Studi di Trento | ||
| email: [email protected] | ||
References | ||
---------- | ||
|
||
- **F.N. Fritsch and R.E. Carlson**, | ||
*Monotone Piecewise Cubic Interpolation*, | ||
SIAM Journal of Numerical Analysis, Vol.17, No. 2, pp. 238-246, 1980. | ||
|
||
- **Hiroshi Akima**, | ||
*Journal of the ACM*, | ||
Vol.17, No. 4, 589-602, 1970. | ||
|
||
- **Hiroshi Akima**, | ||
*A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points*. | ||
ACM Transactions on Mathematical Software, Vol.4, 148-164, 1978. | ||
|
||
.. |Build Status| image:: https://travis-ci.org/ebertolazzi/Splines.svg?branch=master | ||
:target: https://travis-ci.org/ebertolazzi/Splines | ||
.. |View Splines on File Exchange| image:: https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg | ||
:target: https://www.mathworks.com/matlabcentral/fileexchange/54481-splines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,42 +4,25 @@ Splines | |
[![Build Status](https://travis-ci.org/ebertolazzi/Splines.svg?branch=master)](https://travis-ci.org/ebertolazzi/Splines) | ||
[![View Splines on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/54481-splines) | ||
|
||
<br> | ||
### Introduction | ||
|
||
[Splines](https://github.com/ebertolazzi/Splines) | ||
is a set of C++ classes (with MATLAB mex interface) which | ||
``Splines`` is a set of C++ classes (with MATLAB mex interface) which | ||
implements varios spline interpolation. | ||
The classes are the following: | ||
|
||
- ConstantSpline, for piecewise constants functions | ||
- LinearSpline, for piecewise linear interpolation | ||
- CubicSpline, for classical cubic spline interpolation | ||
- AkimaSpline, for Akima "non oscillatory" spline interpolation | ||
- BesselSpline, for Bessel "non oscillatory" spline interpolation | ||
- PchipSpline, | ||
- QuinticSpline, Simple quintic spline based on PCHIP | ||
|
||
### References | ||
|
||
- F.N. Fritsch and R.E. Carlson, | ||
Monotone Piecewise Cubic Interpolation,<br> | ||
SIAM Journal of Numerical Analysis, Vol. 17, No. 2, pp. 238-246, | ||
April 1980. | ||
|
||
### Matlab | ||
|
||
To use in MATLAB install the toolbox `Splines.mltbx` then compile the files running `CompileSplinesLib` (available at [releases](https://github.com/ebertolazzi/Splines/releases)) | ||
### Matlab Toolbox | ||
|
||
To use in MATLAB install the toolbox `Splines.mltbx` then compile the files running `CompileSplinesLib` (available at the [link](https://github.com/ebertolazzi/Splines/releases)) | ||
|
||
### C++ Usage | ||
|
||
The usage is simple: | ||
|
||
~~~~~~~~~~~~~ | ||
```cpp | ||
#include "Splines.hh" | ||
using namespace SplinesLoad; | ||
|
||
.... | ||
// .... | ||
|
||
CubicSpline spline; | ||
double x[] = {1,2,3,4}; | ||
|
@@ -50,15 +33,15 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1 | |
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
~~~~~~~~~~~~~ | ||
``` | ||
splines can be built incrementally | ||
~~~~~~~~~~~~~ | ||
```cpp | ||
#include "Splines.hh" | ||
using namespace SplinesLoad; | ||
.... | ||
// .... | ||
CubicSpline spline; | ||
|
@@ -72,17 +55,17 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1 | |
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
~~~~~~~~~~~~~ | ||
``` | ||
|
||
or by using standard vector | ||
|
||
~~~~~~~~~~~~~ | ||
```cpp | ||
#include "Splines.hh" | ||
#include <vector> | ||
using namespace SplinesLoad; | ||
using namespace std; | ||
|
||
.... | ||
// .... | ||
|
||
CubicSpline spline; | ||
std::vector x, y; | ||
|
@@ -96,7 +79,7 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1 | |
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1 | ||
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1 | ||
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1 | ||
~~~~~~~~~~~~~ | ||
``` | ||
|
||
### Compile and tests | ||
|
||
|
@@ -128,11 +111,22 @@ To run the test | |
|
||
Available at: [http://ebertolazzi.github.io/Splines](http://ebertolazzi.github.io/Splines) | ||
|
||
* * * | ||
### Developer | ||
|
||
Enrico Bertolazzi<br> | ||
Dipartimento di Ingegneria Industriale<br> | ||
Universita` degli Studi di Trento<br> | ||
Enrico Bertolazzi | ||
Dipartimento di Ingegneria Industriale | ||
Università degli Studi di Trento | ||
email: [email protected] | ||
|
||
* * * | ||
### References | ||
|
||
- *F.N. Fritsch and R.E. Carlson*, | ||
Monotone Piecewise Cubic Interpolation, | ||
SIAM Journal of Numerical Analysis, | ||
Vol.17, No. 2, pp. 238-246, 1980. | ||
|
||
- *Hiroshi Akima*, Journal of the ACM, | ||
Vol.17, No. 4, 589-602, 1970. | ||
|
||
- *Hiroshi Akima*, A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points. | ||
ACM Transactions on Mathematical Software, Vol.4, 148-164, 1978. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<deployment-project plugin="plugin.toolbox" plugin-version="1.0"> | ||
<configuration build-checksum="2141474772" file="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/Splines.prj" location="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines" name="Splines" target="target.toolbox" target-name="Package Toolbox"> | ||
<configuration build-checksum="1526834762" file="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/Splines.prj" location="/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines" name="Splines" target="target.toolbox" target-name="Package Toolbox"> | ||
<param.appname>Splines</param.appname> | ||
<param.authnamewatermark>Enrico Bertolazzi</param.authnamewatermark> | ||
<param.email>[email protected]</param.email> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 56f7eb05eb27aab67f3439712c87a36f | ||
config: 3d34a6afae63f155f41ce9d9a844bfb3 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
Class Hierarchy | ||
--------------- | ||
|
||
|
||
.. raw:: html | ||
|
||
<div id="class-treeView"></div> | ||
<script type="text/javascript"> | ||
function getClassHierarchyTree() { | ||
return [ | ||
] | ||
} | ||
</script><!-- end getClassHierarchyTree() function --> | ||
|
||
.. end raw html for treeView | ||
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
..._Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _dir__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src: | ||
|
||
|
||
Directory src | ||
============= | ||
|
||
|
||
*Directory path:* ``/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/src`` | ||
|
||
|
||
Files | ||
----- | ||
|
||
- :ref:`file__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src_SplinesCinterface.h` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.