Volume Cartographer 2.27.0
|
A small derivative library that handles calculating derivatives up to the second order. More...
Functions | |
template<typename T > | |
T | volcart::segmentation::D1Forward (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the first derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D1Backward (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the first derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D1Central (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the first derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D1FivePointStencil (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the first derivative for a sampled point using a five-point stencil. More... | |
template<typename T > | |
T | volcart::segmentation::D1At (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the first derivative for a sampled point. More... | |
template<typename T > | |
std::vector< T > | volcart::segmentation::D1 (const std::vector< T > &vs, int hstep=1) |
Calculate the first derivative for a vector of sampled points. More... | |
template<typename T > | |
T | volcart::segmentation::D2Forward (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the second derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D2Backward (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the second derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D2Central (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the second derivative for a sampled point. More... | |
template<typename T > | |
T | volcart::segmentation::D2FivePointStencil (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the second derivative for a sampled point using a five-point stencil. More... | |
template<typename T > | |
T | volcart::segmentation::D2At (const std::vector< T > &vs, int index, int hstep=1) |
Calculate the second derivative for a sampled point. More... | |
template<typename T > | |
std::vector< T > | volcart::segmentation::D2 (const std::vector< T > &vs, int hstep=1) |
Calculate the second derivative for a vector of sampled points. More... | |
Variables | |
static constexpr std::array< std::array< double, 9 >, 4 > | volcart::segmentation::D1_CENTRAL_DIFF_COEFFS |
static constexpr std::array< std::array< double, 9 >, 4 > | volcart::segmentation::D2_CENTRAL_DIFF_COEFFS |
A small derivative library that handles calculating derivatives up to the second order.
std::vector< T > volcart::segmentation::D1 | ( | const std::vector< T > & | vs, |
int | hstep = 1 |
||
) |
Calculate the first derivative for a vector of sampled points.
vs | Input samples |
hstep | Offset step |
Definition at line 164 of file Derivative.hpp.
T volcart::segmentation::D1At | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the first derivative for a sampled point.
Uses D1Forward(), D1Backward(), D1Central(), or D1FivePointStencil() based on hstep and the size of vs.
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 141 of file Derivative.hpp.
T volcart::segmentation::D1Backward | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the first derivative for a sampled point.
Derivative is calculated from vs[index - hstep] to vs[index]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Backward offset step |
Definition at line 71 of file Derivative.hpp.
T volcart::segmentation::D1Central | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the first derivative for a sampled point.
Derivative is calculated from vs[index - hstep] to vs[index + hstep]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 89 of file Derivative.hpp.
T volcart::segmentation::D1FivePointStencil | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the first derivative for a sampled point using a five-point stencil.
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 112 of file Derivative.hpp.
T volcart::segmentation::D1Forward | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the first derivative for a sampled point.
Derivative is calculated from vs[index] to vs[index + hstep]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Forward offset step |
Definition at line 53 of file Derivative.hpp.
std::vector< T > volcart::segmentation::D2 | ( | const std::vector< T > & | vs, |
int | hstep = 1 |
||
) |
Calculate the second derivative for a vector of sampled points.
vs | Input samples |
hstep | Offset step |
Definition at line 283 of file Derivative.hpp.
T volcart::segmentation::D2At | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the second derivative for a sampled point.
Uses D2Forward(), D2Backward(), D2Central(), or D2FivePointStencil() based on hstep and the size of vs.
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 263 of file Derivative.hpp.
T volcart::segmentation::D2Backward | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the second derivative for a sampled point.
Derivative is calculated from vs[index - hstep] to vs[index]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Backward offset step |
Definition at line 198 of file Derivative.hpp.
T volcart::segmentation::D2Central | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the second derivative for a sampled point.
Derivative is calculated from vs[index - hstep] to vs[index + hstep]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 214 of file Derivative.hpp.
T volcart::segmentation::D2FivePointStencil | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the second derivative for a sampled point using a five-point stencil.
vs | Input samples |
index | Index of sampled point in vector |
hstep | Offset step |
Definition at line 233 of file Derivative.hpp.
T volcart::segmentation::D2Forward | ( | const std::vector< T > & | vs, |
int | index, | ||
int | hstep = 1 |
||
) |
Calculate the second derivative for a sampled point.
Derivative is calculated from vs[index] to vs[index + hstep]
vs | Input samples |
index | Index of sampled point in vector |
hstep | Forward offset step |
Definition at line 181 of file Derivative.hpp.
|
staticconstexpr |
Central difference coefficients for first derivatives
Definition at line 23 of file Derivative.hpp.
|
staticconstexpr |
Central difference coefficients for second derivatives
Definition at line 34 of file Derivative.hpp.