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
Vectors

Classes

class  ndarray::Vector< T, N >
 A fixed-size 1D array class. More...
 
struct  ndarray::Vector< T, 0 >
 PArtial specialization for zero-size vectors to avoid compiler errors on some platforms. More...
 

Functions

template<typename T , int N, int M>
Vector< T, N+M > ndarray::concatenate (Vector< T, N > const &a, Vector< T, M > const &b)
 Concatenate two Vectors into a single long Vector. More...
 
template<typename T , int N>
Vector< T, N+1 > ndarray::concatenate (Vector< T, N > const &a, T const &b)
 Return a new Vector with the given scalar appended to the original. More...
 
template<typename T , int N>
Vector< T, N+1 > ndarray::concatenate (T const &a, Vector< T, N > const &b)
 Return a new Vector with the given scalar prepended to the original. More...
 
template<typename T , int N>
Vector< T, N > ndarray::makeVector (T v1, T v2,..., T vN)
 Variadic constructor for Vector. More...
 
template<typename T , int N>
Vector< T, N > ndarray::operator~ (Vector< T, N > const &vector)
 Unary bitwise NOT for Vector. More...
 
template<typename T , int N>
Vector< T, N > ndarray::operator! (Vector< T, N > const &vector)
 Unary negation for Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator+ (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector + Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator+ (Vector< T, N > const &a, U b)
 Operator overload for Vector + Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator+ (U a, Vector< T, N > const &b)
 Operator overload for Scalar + Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator- (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector - Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator- (Vector< T, N > const &a, U b)
 Operator overload for Vector - Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator- (U a, Vector< T, N > const &b)
 Operator overload for Scalar - Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator* (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector * Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator* (Vector< T, N > const &a, U b)
 Operator overload for Vector * Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator* (U a, Vector< T, N > const &b)
 Operator overload for Scalar * Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator/ (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector / Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator/ (Vector< T, N > const &a, U b)
 Operator overload for Vector / Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator/ (U a, Vector< T, N > const &b)
 Operator overload for Scalar / Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator% (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector % Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator% (Vector< T, N > const &a, U b)
 Operator overload for Vector % Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator% (U a, Vector< T, N > const &b)
 Operator overload for Scalar % Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator& (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector & Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator& (Vector< T, N > const &a, U b)
 Operator overload for Vector & Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator& (U a, Vector< T, N > const &b)
 Operator overload for Scalar & Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator^ (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector ^ Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator^ (Vector< T, N > const &a, U b)
 Operator overload for Vector ^ Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator^ (U a, Vector< T, N > const &b)
 Operator overload for Scalar ^ Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator| (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector | Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator| (Vector< T, N > const &a, U b)
 Operator overload for Vector | Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator| (U a, Vector< T, N > const &b)
 Operator overload for Scalar | Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator<< (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector << Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator<< (Vector< T, N > const &a, U b)
 Operator overload for Vector << Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator<< (U a, Vector< T, N > const &b)
 Operator overload for Scalar << Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator>> (Vector< T, N > const &a, Vector< U, N > const &b)
 Operator overload for Vector >> Vector. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator>> (Vector< T, N > const &a, U b)
 Operator overload for Vector >> Scalar. More...
 
template<typename T , typename U , int N>
Vector< typename Promote< T, U >
::Type, N > 
ndarray::operator>> (U a, Vector< T, N > const &b)
 Operator overload for Scalar >> Vector. More...
 

Detailed Description

Function Documentation

template<typename T , int N, int M>
Vector<T,N+M> ndarray::concatenate ( Vector< T, N > const &  a,
Vector< T, M > const &  b 
)
inline

Concatenate two Vectors into a single long Vector.

Definition at line 524 of file Vector.h.

524  {
525  Vector<T,N+M> r;
526  std::copy(a.begin(),a.end(),r.begin());
527  std::copy(b.begin(),b.end(),r.begin()+N);
528  return r;
529 }
SelectEigenView< T >::Type copy(Eigen::EigenBase< T > const &other)
Copy an arbitrary Eigen expression into a new EigenView.
Definition: eigen.h:390
afw::table::Key< double > b
template<typename T , int N>
Vector<T,N+1> ndarray::concatenate ( Vector< T, N > const &  a,
T const &  b 
)
inline

Return a new Vector with the given scalar appended to the original.

Definition at line 533 of file Vector.h.

533  {
534  Vector<T,N+1> r;
535  std::copy(a.begin(),a.end(),r.begin());
536  r[N] = b;
537  return r;
538 }
SelectEigenView< T >::Type copy(Eigen::EigenBase< T > const &other)
Copy an arbitrary Eigen expression into a new EigenView.
Definition: eigen.h:390
afw::table::Key< double > b
template<typename T , int N>
Vector<T,N+1> ndarray::concatenate ( T const &  a,
Vector< T, N > const &  b 
)
inline

Return a new Vector with the given scalar prepended to the original.

Definition at line 542 of file Vector.h.

542  {
543  Vector<T,N+1> r;
544  r[0] = a;
545  std::copy(b.begin(),b.end(),r.begin()+1);
546  return r;
547 }
SelectEigenView< T >::Type copy(Eigen::EigenBase< T > const &other)
Copy an arbitrary Eigen expression into a new EigenView.
Definition: eigen.h:390
afw::table::Key< double > b
template<typename T , int N>
Vector<T,N> ndarray::makeVector ( v1,
v2,
  ...,
vN 
)

Variadic constructor for Vector.

Defined for N in [0 - NDARRAY_MAKE_VECTOR_MAX).

template<typename T , int N>
Vector<T,N> ndarray::operator! ( Vector< T, N > const &  vector)
inline

Unary negation for Vector.

Definition at line 571 of file Vector.h.

571  {
572  Vector<T,N> r(vector);
573  for (typename Vector<T,N>::Iterator i = r.begin(); i != r.end(); ++i) (*i) = !(*i);
574  return r;
575 }
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator% ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector % Vector.

Definition at line 669 of file Vector.h.

669  {
670  Vector<typename Promote<T,U>::Type,N> r(a);
671  return r %= b;
672  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator% ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector % Scalar.

Definition at line 676 of file Vector.h.

676  {
677  Vector<typename Promote<T,U>::Type,N> r(a);
678  return r %= b;
679  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator% ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar % Vector.

Definition at line 683 of file Vector.h.

683  {
684  Vector<typename Promote<T,U>::Type,N> r(a);
685  return r %= b;
686  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator& ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector & Vector.

Definition at line 691 of file Vector.h.

691  {
692  Vector<typename Promote<T,U>::Type,N> r(a);
693  return r &= b;
694  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator& ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector & Scalar.

Definition at line 698 of file Vector.h.

698  {
699  Vector<typename Promote<T,U>::Type,N> r(a);
700  return r &= b;
701  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator& ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar & Vector.

Definition at line 705 of file Vector.h.

705  {
706  Vector<typename Promote<T,U>::Type,N> r(a);
707  return r &= b;
708  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator* ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector * Vector.

Definition at line 625 of file Vector.h.

625  {
626  Vector<typename Promote<T,U>::Type,N> r(a);
627  return r *= b;
628  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator* ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector * Scalar.

Definition at line 632 of file Vector.h.

632  {
633  Vector<typename Promote<T,U>::Type,N> r(a);
634  return r *= b;
635  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator* ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar * Vector.

Definition at line 639 of file Vector.h.

639  {
640  Vector<typename Promote<T,U>::Type,N> r(a);
641  return r *= b;
642  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator+ ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector + Vector.

Definition at line 581 of file Vector.h.

581  {
582  Vector<typename Promote<T,U>::Type,N> r(a);
583  return r += b;
584  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator+ ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector + Scalar.

Definition at line 588 of file Vector.h.

588  {
589  Vector<typename Promote<T,U>::Type,N> r(a);
590  return r += b;
591  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator+ ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar + Vector.

Definition at line 595 of file Vector.h.

595  {
596  Vector<typename Promote<T,U>::Type,N> r(a);
597  return r += b;
598  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator- ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector - Vector.

Definition at line 603 of file Vector.h.

603  {
604  Vector<typename Promote<T,U>::Type,N> r(a);
605  return r -= b;
606  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator- ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector - Scalar.

Definition at line 610 of file Vector.h.

610  {
611  Vector<typename Promote<T,U>::Type,N> r(a);
612  return r -= b;
613  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator- ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar - Vector.

Definition at line 617 of file Vector.h.

617  {
618  Vector<typename Promote<T,U>::Type,N> r(a);
619  return r -= b;
620  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator/ ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector / Vector.

Definition at line 647 of file Vector.h.

647  {
648  Vector<typename Promote<T,U>::Type,N> r(a);
649  return r /= b;
650  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator/ ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector / Scalar.

Definition at line 654 of file Vector.h.

654  {
655  Vector<typename Promote<T,U>::Type,N> r(a);
656  return r /= b;
657  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator/ ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar / Vector.

Definition at line 661 of file Vector.h.

661  {
662  Vector<typename Promote<T,U>::Type,N> r(a);
663  return r /= b;
664  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator<< ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector << Scalar.

Definition at line 764 of file Vector.h.

764  {
765  Vector<typename Promote<T,U>::Type,N> r(a);
766  return r <<= b;
767  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator<< ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector << Vector.

Definition at line 757 of file Vector.h.

757  {
758  Vector<typename Promote<T,U>::Type,N> r(a);
759  return r <<= b;
760  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator<< ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar << Vector.

Definition at line 771 of file Vector.h.

771  {
772  Vector<typename Promote<T,U>::Type,N> r(a);
773  return r <<= b;
774  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator>> ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector >> Vector.

Definition at line 779 of file Vector.h.

779  {
780  Vector<typename Promote<T,U>::Type,N> r(a);
781  return r >>= b;
782  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator>> ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector >> Scalar.

Definition at line 786 of file Vector.h.

786  {
787  Vector<typename Promote<T,U>::Type,N> r(a);
788  return r >>= b;
789  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator>> ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar >> Vector.

Definition at line 793 of file Vector.h.

793  {
794  Vector<typename Promote<T,U>::Type,N> r(a);
795  return r >>= b;
796  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator^ ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector ^ Vector.

Definition at line 713 of file Vector.h.

713  {
714  Vector<typename Promote<T,U>::Type,N> r(a);
715  return r ^= b;
716  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator^ ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector ^ Scalar.

Definition at line 720 of file Vector.h.

720  {
721  Vector<typename Promote<T,U>::Type,N> r(a);
722  return r ^= b;
723  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator^ ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar ^ Vector.

Definition at line 727 of file Vector.h.

727  {
728  Vector<typename Promote<T,U>::Type,N> r(a);
729  return r ^= b;
730  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator| ( Vector< T, N > const &  a,
Vector< U, N > const &  b 
)

Operator overload for Vector | Vector.

Definition at line 735 of file Vector.h.

735  {
736  Vector<typename Promote<T,U>::Type,N> r(a);
737  return r |= b;
738  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator| ( Vector< T, N > const &  a,
b 
)

Operator overload for Vector | Scalar.

Definition at line 742 of file Vector.h.

742  {
743  Vector<typename Promote<T,U>::Type,N> r(a);
744  return r |= b;
745  }
afw::table::Key< double > b
template<typename T , typename U , int N>
Vector<typename Promote<T,U>::Type,N> ndarray::operator| ( a,
Vector< T, N > const &  b 
)

Operator overload for Scalar | Vector.

Definition at line 749 of file Vector.h.

749  {
750  Vector<typename Promote<T,U>::Type,N> r(a);
751  return r |= b;
752  }
afw::table::Key< double > b
template<typename T , int N>
Vector<T,N> ndarray::operator~ ( Vector< T, N > const &  vector)
inline

Unary bitwise NOT for Vector.

Definition at line 563 of file Vector.h.

563  {
564  Vector<T,N> r(vector);
565  for (typename Vector<T,N>::Iterator i = r.begin(); i != r.end(); ++i) (*i) = ~(*i);
566  return r;
567 }