Class tensor_grid1 (o2scl)¶
-
template<class
vec_t
= std::vector<double>, classvec_size_t
= std::vector<size_t>>
classo2scl
::
tensor_grid1
: public o2scl::tensor_grid<std::vector<double>, std::vector<size_t>>¶ Rank 1 tensor with a grid.
- Idea for Future:
Make rank-specific get_val and set_val functions?
Public Functions
-
tensor_grid1
()¶ Create an empty tensor.
-
tensor_grid1
(size_t sz)¶ Create a rank 2 tensor of size
(sz,sz2,sz3)
-
~tensor_grid1
()¶
-
double &
get
(size_t ix1)¶ Get the element indexed by
(ix1)
-
const double &
get
(size_t ix1) const¶ Get the element indexed by
(ix1)
-
void
set
(size_t ix1, double val)¶ Set the element indexed by
(ix1) to value
val
.
-
template<class
range_t
= ub_range, classdata_range_t
= ubvector_range, classindex_range_t
= ubvector_size_t_range>
doubleinterp
(double x)¶ Interpolate
x
and return the results.
-
double
interp_linear
(double x)¶ Interpolate
x
and return the results.