#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/Math/LinearAlgebra/General/Vector.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVL_VECTOR_HEADER #define RAVL_VECTOR_HEADER 1 /////////////////////////////////////////////////// //! rcsid="$Id: Vector.hh,v 1.9 2002/08/02 12:25:04 jonstarck Exp $" //! file="Ravl/Math/LinearAlgebra/General/Vector.hh" //! lib=RavlMath //! userlevel=Normal //! author="Charles Galambos" //! date="24/01/2001" //! docentry="Ravl.Math.Linear Algebra" #include "Ravl/TVector.hh" namespace RavlN { //! userlevel=Normal //: Vector of real values. class VectorC : public TVectorC { public: VectorC() {} //: Default constructor. explicit VectorC(UIntT size) : TVectorC(size) {} //: Constructor. // Create a vector of 'size' elements VectorC(const TVectorC &oth) : TVectorC(oth) {} //: Base class constructor. VectorC(const SArray1dC &oth) : TVectorC(oth) {} //: Base class constructor. VectorC(const Slice1dC &oth,bool alwaysCopy = true) : TVectorC(oth,alwaysCopy) {} //: Construct from a slice #if !RAVL_COMPILER_VISUALCPP template inline VectorC(const TFVectorC &dat) : TVectorC(dat) {} //: Construct from a fixed size array. #endif VectorC(RealT v1,RealT v2) : TVectorC(2) { (*this)[0] = v1; (*this)[1] = v2; } //: Create a vector with two real values. VectorC(RealT v1,RealT v2,RealT v3) : TVectorC(3) { (*this)[0] = v1; (*this)[1] = v2; (*this)[2] = v3; } //: Create a vector with three real values. VectorC(RealT v1,RealT v2,RealT v3,RealT v4) : TVectorC(4) { (*this)[0] = v1; (*this)[1] = v2; (*this)[2] = v3; (*this)[3] = v4; } //: Create a vector with four real values. VectorC(RealT v1,RealT v2,RealT v3,RealT v4,RealT v5) : TVectorC(5) { (*this)[0] = v1; (*this)[1] = v2; (*this)[2] = v3; (*this)[3] = v4; (*this)[4] = v5; } //: Create a vector with five real values. VectorC(RealT v1,RealT v2,RealT v3,RealT v4,RealT v5,RealT v6) : TVectorC(6) { (*this)[0] = v1; (*this)[1] = v2; (*this)[2] = v3; (*this)[3] = v4; (*this)[4] = v5; (*this)[5] = v6; } //: Create a vector with six real values. bool IsReal() const; //: Test if vector only contains real values. // This will return false if either nan's (Not an number) // or infinite values are found. }; } #endif