Skip to content

Commit c59e5ca

Browse files
committed
updated documentation and toolbox
1 parent 02239ae commit c59e5ca

File tree

882 files changed

+61518
-95265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

882 files changed

+61518
-95265
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,15 @@ toolbox/license.txt
6767
docs_build/xml
6868
docs_build/sphinx/api
6969
docs_build/sphinx/_build
70+
docs_build/sphinx/api-c
71+
docs_build/sphinx/api-cpp
72+
docs_build/sphinx/api-matlab
73+
docs_build/sphinx_c/_build
74+
docs_build/sphinx_c/api-c
75+
docs_build/sphinx_cpp/_build
76+
docs_build/sphinx_cpp/api-cpp
77+
docs_build/sphinx_matlab/_build
78+
docs_build/sphinx_matlab/api-matlab
79+
docs_build/xml-c
80+
docs_build/xml-cpp
81+
docs_build/xml-matlab

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ FOREACH (F ${S})
6464
FILE( RELATIVE_PATH RF ${CMAKE_CURRENT_SOURCE_DIR} "${F}" )
6565
LIST( APPEND HEADERS ${RF} )
6666
ENDFOREACH (F ${S})
67+
FILE( GLOB S ./src/*.hxx )
68+
FOREACH (F ${S})
69+
FILE( RELATIVE_PATH RF ${CMAKE_CURRENT_SOURCE_DIR} "${F}" )
70+
LIST( APPEND HEADERS ${RF} )
71+
ENDFOREACH (F ${S})
6772

6873
INCLUDE_DIRECTORIES( src lib3rd/include )
6974

README.rst

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
Splines |Build Status| |View Splines on File Exchange|
2+
======================================================
3+
4+
Introduction
5+
------------
6+
7+
``Splines`` is a set of C++ classes (with MATLAB mex interface) which
8+
implements varios spline interpolation.
9+
10+
Matlab Toolbox
11+
--------------
12+
13+
To use in MATLAB install the toolbox ``Splines.mltbx`` then compile the
14+
files running ``CompileSplinesLib`` (available at the
15+
`link <https://github.com/ebertolazzi/Splines/releases>`__)
16+
17+
C++ Usage
18+
---------
19+
20+
The usage is simple:
21+
22+
.. code:: cpp
23+
24+
#include "Splines.hh"
25+
using namespace SplinesLoad;
26+
27+
// ....
28+
29+
CubicSpline spline;
30+
double x[] = {1,2,3,4};
31+
double y[] = {3,1,1,3};
32+
spline.build(x,y,4); // build a cubic spline with 4 points
33+
34+
cout << spline(1.1) << '\n'; // spline at x = 1.1
35+
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
36+
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
37+
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
38+
39+
splines can be built incrementally
40+
41+
.. code:: cpp
42+
43+
#include "Splines.hh"
44+
using namespace SplinesLoad;
45+
46+
// ....
47+
48+
CubicSpline spline;
49+
50+
spline . pushBack( 1, 3 );
51+
spline . pushBack( 2, 1 );
52+
spline . pushBack( 3, 1 );
53+
spline . pushBack( 4, 3 );
54+
spline . build();
55+
56+
cout << spline(1.1) << '\n'; // spline at x = 1.1
57+
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
58+
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
59+
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
60+
61+
or by using standard vector
62+
63+
.. code:: cpp
64+
65+
#include "Splines.hh"
66+
#include <vector>
67+
using namespace SplinesLoad;
68+
using namespace std;
69+
70+
// ....
71+
72+
CubicSpline spline;
73+
std::vector x, y;
74+
x.push_back(1); y.push_back(3);
75+
x.push_back(2); y.push_back(1);
76+
x.push_back(3); y.push_back(1);
77+
x.push_back(4); y.push_back(3);
78+
spline . build(x,y);
79+
80+
cout << spline(1.1) << '\n'; // spline at x = 1.1
81+
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
82+
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
83+
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
84+
85+
Compile and tests
86+
-----------------
87+
88+
**Using makefile**
89+
90+
Edit makefile file to match compiler of your OS and do:
91+
92+
.. code:: sh
93+
94+
make
95+
96+
**Using rakefile**
97+
98+
.. code:: sh
99+
100+
rake build_win # on windows
101+
rake build_linux # on linux
102+
rake build_osx # on mac
103+
104+
To run the test
105+
106+
.. code:: sh
107+
108+
make run # using makefile
109+
rake run # using rake on linux and osx
110+
rake run_win # using rake on windows
111+
112+
Online Documentation
113+
--------------------
114+
115+
Available at: http://ebertolazzi.github.io/Splines
116+
117+
Developer
118+
---------
119+
120+
| Enrico Bertolazzi
121+
| Dipartimento di Ingegneria Industriale
122+
| Università degli Studi di Trento
123+
124+
125+
References
126+
----------
127+
128+
- **F.N. Fritsch and R.E. Carlson**,
129+
*Monotone Piecewise Cubic Interpolation*,
130+
SIAM Journal of Numerical Analysis, Vol.17, No. 2, pp. 238-246, 1980.
131+
132+
- **Hiroshi Akima**,
133+
*Journal of the ACM*,
134+
Vol.17, No. 4, 589-602, 1970.
135+
136+
- **Hiroshi Akima**,
137+
*A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points*.
138+
ACM Transactions on Mathematical Software, Vol.4, 148-164, 1978.
139+
140+
.. |Build Status| image:: https://travis-ci.org/ebertolazzi/Splines.svg?branch=master
141+
:target: https://travis-ci.org/ebertolazzi/Splines
142+
.. |View Splines on File Exchange| image:: https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg
143+
:target: https://www.mathworks.com/matlabcentral/fileexchange/54481-splines

README.md renamed to README_OLD.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,25 @@ Splines
44
[![Build Status](https://travis-ci.org/ebertolazzi/Splines.svg?branch=master)](https://travis-ci.org/ebertolazzi/Splines)
55
[![View Splines on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/54481-splines)
66

7-
<br>
7+
### Introduction
88

9-
[Splines](https://github.com/ebertolazzi/Splines)
10-
is a set of C++ classes (with MATLAB mex interface) which
9+
``Splines`` is a set of C++ classes (with MATLAB mex interface) which
1110
implements varios spline interpolation.
12-
The classes are the following:
13-
14-
- ConstantSpline, for piecewise constants functions
15-
- LinearSpline, for piecewise linear interpolation
16-
- CubicSpline, for classical cubic spline interpolation
17-
- AkimaSpline, for Akima "non oscillatory" spline interpolation
18-
- BesselSpline, for Bessel "non oscillatory" spline interpolation
19-
- PchipSpline,
20-
- QuinticSpline, Simple quintic spline based on PCHIP
21-
22-
### References
2311

24-
- F.N. Fritsch and R.E. Carlson,
25-
Monotone Piecewise Cubic Interpolation,<br>
26-
SIAM Journal of Numerical Analysis, Vol. 17, No. 2, pp. 238-246,
27-
April 1980.
2812

29-
### Matlab
30-
31-
To use in MATLAB install the toolbox `Splines.mltbx` then compile the files running `CompileSplinesLib` (available at [releases](https://github.com/ebertolazzi/Splines/releases))
13+
### Matlab Toolbox
3214

15+
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))
3316

3417
### C++ Usage
3518

3619
The usage is simple:
3720

38-
~~~~~~~~~~~~~
21+
```cpp
3922
#include "Splines.hh"
4023
using namespace SplinesLoad;
4124

42-
....
25+
// ....
4326

4427
CubicSpline spline;
4528
double x[] = {1,2,3,4};
@@ -50,15 +33,15 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1
5033
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
5134
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
5235
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
53-
~~~~~~~~~~~~~
36+
```
5437
5538
splines can be built incrementally
5639
57-
~~~~~~~~~~~~~
40+
```cpp
5841
#include "Splines.hh"
5942
using namespace SplinesLoad;
6043
61-
....
44+
// ....
6245
6346
CubicSpline spline;
6447
@@ -72,17 +55,17 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1
7255
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
7356
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
7457
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
75-
~~~~~~~~~~~~~
58+
```
7659

7760
or by using standard vector
7861

79-
~~~~~~~~~~~~~
62+
```cpp
8063
#include "Splines.hh"
8164
#include <vector>
8265
using namespace SplinesLoad;
8366
using namespace std;
8467

85-
....
68+
// ....
8669

8770
CubicSpline spline;
8871
std::vector x, y;
@@ -96,7 +79,7 @@ cout << spline(1.1) << '\n'; // spline at x = 1.1
9679
cout << spline.D(1.1) << '\n'; // spline first derivative at x = 1.1
9780
cout << spline.DD(1.1) << '\n'; // spline second derivative at x = 1.1
9881
cout << spline.DDD(1.1) << '\n'; // spline third derivative at x = 1.1
99-
~~~~~~~~~~~~~
82+
```
10083

10184
### Compile and tests
10285

@@ -128,11 +111,22 @@ To run the test
128111

129112
Available at: [http://ebertolazzi.github.io/Splines](http://ebertolazzi.github.io/Splines)
130113

131-
* * *
114+
### Developer
132115

133-
Enrico Bertolazzi<br>
134-
Dipartimento di Ingegneria Industriale<br>
135-
Universita` degli Studi di Trento<br>
116+
Enrico Bertolazzi
117+
Dipartimento di Ingegneria Industriale
118+
Università degli Studi di Trento
136119
137120

138-
* * *
121+
### References
122+
123+
- *F.N. Fritsch and R.E. Carlson*,
124+
Monotone Piecewise Cubic Interpolation,
125+
SIAM Journal of Numerical Analysis,
126+
Vol.17, No. 2, pp. 238-246, 1980.
127+
128+
- *Hiroshi Akima*, Journal of the ACM,
129+
Vol.17, No. 4, 589-602, 1970.
130+
131+
- *Hiroshi Akima*, A Method of Bivariate Interpolation and Smooth Surface Fitting for Irregularly Distributed Data Points.
132+
ACM Transactions on Mathematical Software, Vol.4, 148-164, 1978.

Splines.prj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
2-
<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">
2+
<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">
33
<param.appname>Splines</param.appname>
44
<param.authnamewatermark>Enrico Bertolazzi</param.authnamewatermark>
55
<param.email>[email protected]</param.email>

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 56f7eb05eb27aab67f3439712c87a36f
3+
config: 3d34a6afae63f155f41ce9d9a844bfb3
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
Class Hierarchy
3+
---------------
4+
5+
6+
.. raw:: html
7+
8+
<div id="class-treeView"></div>
9+
<script type="text/javascript">
10+
function getClassHierarchyTree() {
11+
return [
12+
13+
]
14+
}
15+
</script><!-- end getClassHierarchyTree() function -->
16+
17+
.. end raw html for treeView
18+
19+

docs/_sources/api/define__splines_cinterface_8h_1ade8086f0fd9d3bd49264ebd0bd5b6cdc.rst.txt renamed to docs/_sources/api-c/define__splines_cinterface_8h_1ade8086f0fd9d3bd49264ebd0bd5b6cdc.rst.txt

File renamed without changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _dir__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src:
2+
3+
4+
Directory src
5+
=============
6+
7+
8+
*Directory path:* ``/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/src``
9+
10+
11+
Files
12+
-----
13+
14+
- :ref:`file__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src_SplinesCinterface.h`
15+
16+

docs/_sources/api/file__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src_SplinesCinterface.cc.rst.txt renamed to docs/_sources/api-c/file__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src_SplinesCinterface.cc.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ File SplinesCinterface.cc
77
|exhale_lsh| :ref:`Parent directory <dir__Users_enrico_Ricerca_develop_C++_pins-mechatronix_LibSources_submodules_Splines_src>` (``/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/src``)
88

99
.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS
10+
11+
.. contents:: Contents
12+
:local:
13+
:backlinks: none
14+
1015
Definition (``/Users/enrico/Ricerca/develop/C++/pins-mechatronix/LibSources/submodules/Splines/src/SplinesCinterface.cc``)
1116
--------------------------------------------------------------------------------------------------------------------------
1217

0 commit comments

Comments
 (0)