C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
exprtk::rtl::vecops::copy< T > Class Template Reference

#include <exprtk.hpp>

Inheritance diagram for exprtk::rtl::vecops::copy< T >:
[legend]
Collaboration diagram for exprtk::rtl::vecops::copy< T >:
[legend]

Public Types

typedef exprtk::igeneric_function< T > igfun_t
 
typedef igfun_t::parameter_list_t parameter_list_t
 
typedef igfun_t::generic_type generic_type
 
typedef generic_type::scalar_view scalar_t
 
typedef generic_type::vector_view vector_t
 
- Public Types inherited from exprtk::igeneric_function< T >
enum  return_type { e_rtrn_scalar = 0 , e_rtrn_string = 1 , e_rtrn_overload = 2 }
 
typedef T type
 
typedef type_store< T > generic_type
 
typedef generic_type::parameter_list parameter_list_t
 

Public Member Functions

 copy ()
 
operator() (const std::size_t &ps_index, parameter_list_t parameters)
 
- Public Member Functions inherited from exprtk::igeneric_function< T >
 igeneric_function (const std::string &param_seq="", const return_type rtr_type=e_rtrn_scalar)
 
virtual ~igeneric_function ()
 
virtual T operator() (parameter_list_t)
 
virtual T operator() (std::string &, parameter_list_t)
 
virtual T operator() (const std::size_t &, std::string &, parameter_list_t)
 
- Public Member Functions inherited from exprtk::function_traits
 function_traits ()
 
bool & allow_zero_parameters ()
 
bool & has_side_effects ()
 
std::size_t & min_num_args ()
 
std::size_t & max_num_args ()
 

Additional Inherited Members

- Public Attributes inherited from exprtk::igeneric_function< T >
std::string parameter_sequence
 
return_type rtrn_type
 

Detailed Description

template<typename T>
class exprtk::rtl::vecops::copy< T >

Definition at line 44579 of file exprtk.hpp.

Member Typedef Documentation

◆ generic_type

template<typename T >
typedef igfun_t::generic_type exprtk::rtl::vecops::copy< T >::generic_type

Definition at line 44585 of file exprtk.hpp.

◆ igfun_t

template<typename T >
typedef exprtk::igeneric_function<T> exprtk::rtl::vecops::copy< T >::igfun_t

Definition at line 44583 of file exprtk.hpp.

◆ parameter_list_t

template<typename T >
typedef igfun_t::parameter_list_t exprtk::rtl::vecops::copy< T >::parameter_list_t

Definition at line 44584 of file exprtk.hpp.

◆ scalar_t

template<typename T >
typedef generic_type::scalar_view exprtk::rtl::vecops::copy< T >::scalar_t

Definition at line 44586 of file exprtk.hpp.

◆ vector_t

template<typename T >
typedef generic_type::vector_view exprtk::rtl::vecops::copy< T >::vector_t

Definition at line 44587 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ copy()

template<typename T >
exprtk::rtl::vecops::copy< T >::copy ( )
inline

Definition at line 44591 of file exprtk.hpp.

44592 : exprtk::igeneric_function<T>("VV|VTTVTT")
44593 /*
44594 Overloads:
44595 0. VV - x(vector), y(vector)
44596 1. VTTVTT - x(vector), xr0, xr1, y(vector), yr0, yr1,
44597 */
44598 {}

Member Function Documentation

◆ operator()()

template<typename T >
T exprtk::rtl::vecops::copy< T >::operator() ( const std::size_t &  ps_index,
parameter_list_t  parameters 
)
inlinevirtual

Reimplemented from exprtk::igeneric_function< T >.

Definition at line 44600 of file exprtk.hpp.

44601 {
44602 const vector_t x(parameters[0]);
44603 vector_t y(parameters[(0 == ps_index) ? 1 : 3]);
44604
44605 std::size_t xr0 = 0;
44606 std::size_t xr1 = x.size() - 1;
44607
44608 std::size_t yr0 = 0;
44609 std::size_t yr1 = y.size() - 1;
44610
44611 if (1 == ps_index)
44612 {
44613 if (
44614 !helper::load_vector_range<T>::process(parameters, xr0, xr1, 1, 2, 0) ||
44615 !helper::load_vector_range<T>::process(parameters, yr0, yr1, 4, 5, 3)
44616 )
44617 return T(0);
44618 }
44619
44620 const std::size_t n = std::min(xr1 - xr0 + 1, yr1 - yr0 + 1);
44621
44622 std::copy(
44623 x.begin() + xr0,
44624 x.begin() + xr0 + n,
44625 y.begin() + yr0);
44626
44627 return T(n);
44628 }
generic_type::vector_view vector_t
Definition exprtk.hpp:44587
static bool process(parameter_list_t &parameters, std::size_t &r0, std::size_t &r1, const std::size_t &r0_prmidx, const std::size_t &r1_prmidx, const std::size_t vec_idx=0)
Definition exprtk.hpp:44231
std::size_t size() const
Definition exprtk.hpp:4772

References exprtk::type_store< T >::type_view< ViewType >::begin(), exprtk::rtl::vecops::helper::load_vector_range< T >::process(), and exprtk::type_store< T >::type_view< ViewType >::size().

Here is the call graph for this function:

The documentation for this class was generated from the following file: