LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Functions
Main

Classes

struct  ndarray::ApproximatelyEqual< T1, T2 >
 Binary predicate for floating point equality comparison with tolerance. More...
 
struct  ndarray::ApproximatelyEqual< std::complex< U1 >, std::complex< U2 > >
 Binary predicate for complex floating point equality comparison with tolerance. More...
 

Functions

template<typename Scalar , typename UnaryFunction >
UnaryFunction::result_type ndarray::vectorize (UnaryFunction const &functor, Scalar const &scalar)
 Apply a non-mutating unary function object to a scalar. More...
 
template<typename Derived , typename UnaryFunction >
detail::UnaryOpExpression
< Derived, UnaryFunction > 
ndarray::vectorize (UnaryFunction const &functor, ExpressionBase< Derived > const &operand)
 Apply a non-mutating unary function object to each element of a multidimensional Expression. More...
 
template<typename Scalar1 , typename Scalar2 , typename BinaryFunction >
BinaryFunction::result_type ndarray::vectorize (BinaryFunction const &functor, Scalar1 const &scalar1, Scalar2 const &scalar2)
 Apply a non-mutating binary function object to a pair of scalars. More...
 
template<typename Derived1 , typename Derived2 , typename BinaryFunction >
detail::BinaryOpExpression
< Derived1, Derived2,
BinaryFunction > 
ndarray::vectorize (BinaryFunction const &functor, ExpressionBase< Derived1 > const &operand1, ExpressionBase< Derived2 > const &operand2)
 Apply a non-mutating binary function object pairwise to the elements of two multidimensional Expressions. More...
 
View< boost::fusion::vector1
< index::Full > > 
ndarray::view ()
 Start a view definition that includes the entire first dimension. More...
 
View< boost::fusion::vector1
< index::Range > > 
ndarray::view (int start, int stop)
 Start a view definition that selects a contiguous range in the first dimension. More...
 
View< boost::fusion::vector1
< index::Slice > > 
ndarray::view (int start, int stop, int step)
 Start a view definition that selects a noncontiguous slice of the first dimension. More...
 
View< boost::fusion::vector1
< index::Scalar > > 
ndarray::view (int n)
 Start a view definition that selects single element from the first dimension. More...
 
template<typename Sequence >
View< Sequence > ndarray::view (Sequence const &sequence)
 Create a view definition from a boost::fusion sequence of index objects. More...
 

Detailed Description

Function Documentation

template<typename Scalar , typename UnaryFunction >
UnaryFunction::result_type ndarray::vectorize ( UnaryFunction const &  functor,
Scalar const &  scalar 
)

Apply a non-mutating unary function object to a scalar.

This overload exists to allow recursive usage of the Array-argument vectorize functions.

Definition at line 85 of file vectorize.h.

88  {
89  return functor(scalar);
90 }
template<typename Derived , typename UnaryFunction >
detail::UnaryOpExpression<Derived,UnaryFunction> ndarray::vectorize ( UnaryFunction const &  functor,
ExpressionBase< Derived > const &  operand 
)

Apply a non-mutating unary function object to each element of a multidimensional Expression.

Evaluation is lazy.

Definition at line 99 of file vectorize.h.

102  {
103  return detail::UnaryOpExpression<Derived,UnaryFunction>(
104  static_cast<Derived const &>(operand),
105  functor
106  );
107 }
template<typename Scalar1 , typename Scalar2 , typename BinaryFunction >
BinaryFunction::result_type ndarray::vectorize ( BinaryFunction const &  functor,
Scalar1 const &  scalar1,
Scalar2 const &  scalar2 
)

Apply a non-mutating binary function object to a pair of scalars.

This overload exists to allow recursive usage of the Array-argument vectorize functions.

Definition at line 124 of file vectorize.h.

128  {
129  return functor(scalar1,scalar2);
130 }
template<typename Derived1 , typename Derived2 , typename BinaryFunction >
detail::BinaryOpExpression<Derived1,Derived2,BinaryFunction> ndarray::vectorize ( BinaryFunction const &  functor,
ExpressionBase< Derived1 > const &  operand1,
ExpressionBase< Derived2 > const &  operand2 
)

Apply a non-mutating binary function object pairwise to the elements of two multidimensional Expressions.

Evaluation is lazy.

Definition at line 140 of file vectorize.h.

144  {
145  return detail::BinaryOpExpression<Derived1,Derived2,BinaryFunction>(
146  static_cast<Derived1 const &>(operand1),
147  static_cast<Derived2 const &>(operand2),
148  functor
149  );
150 }
View< boost::fusion::vector1<index::Full> > ndarray::view ( )
inline

Start a view definition that includes the entire first dimension.

Definition at line 131 of file views.h.

131  {
132  return View< boost::fusion::vector1<index::Full> >(
133  boost::fusion::make_vector(index::Full())
134  );
135 }
View< boost::fusion::vector1<index::Range> > ndarray::view ( int  start,
int  stop 
)
inline

Start a view definition that selects a contiguous range in the first dimension.

Definition at line 138 of file views.h.

138  {
139  return View< boost::fusion::vector1<index::Range> >(
140  boost::fusion::make_vector(index::Range(start, stop))
141  );
142 }
View< boost::fusion::vector1<index::Slice> > ndarray::view ( int  start,
int  stop,
int  step 
)
inline

Start a view definition that selects a noncontiguous slice of the first dimension.

Definition at line 145 of file views.h.

145  {
146  return View< boost::fusion::vector1<index::Slice> >(
147  boost::fusion::make_vector(index::Slice(start, stop, step))
148  );
149 }
View< boost::fusion::vector1<index::Scalar> > ndarray::view ( int  n)
inline

Start a view definition that selects single element from the first dimension.

Definition at line 152 of file views.h.

152  {
153  return View< boost::fusion::vector1<index::Scalar> >(
154  boost::fusion::make_vector(index::Scalar(n))
155  );
156 }
template<typename Sequence >
View<Sequence> ndarray::view ( Sequence const &  sequence)
inline

Create a view definition from a boost::fusion sequence of index objects.

Definition at line 160 of file views.h.

160  {
161  return View<Sequence>(sequence);
162 }