My Project
VectorTool.hh
00001 /*
00002 $Id: VectorTool.hh 2292 2011-08-09 02:25:55Z jisuzuki $
00003 */
00004 
00005 
00006 #include "Header.hh"
00007 #include "ReadTextFile.hh"
00008 
00009 #ifndef VECTORTOOL
00010 #define VECTORTOOL
00011 
00013 
00038 class VectorTool
00039 {
00040 public:
00041   VectorTool(){}
00042  ~VectorTool(){}
00043   
00044   vector<Double> ArrayToVector( Double *p,   UInt4 size );
00045   vector<Float>  ArrayToVector( Float  *p,   UInt4 size );
00046   vector<Int4>   ArrayToVector( Int4   *p,   UInt4 size );
00047   vector<UInt4>  ArrayToVector( UInt4  *p,   UInt4 size );
00048   vector<Int2>   ArrayToVector( Int2   *p,   UInt4 size );
00049   vector<UInt2>  ArrayToVector( UInt2  *p,   UInt4 size );
00050   vector<string> ArrayToVector( string *p,   UInt4 size );
00051   vector<bool>   ArrayToVector( bool *p,     UInt4 size );
00052 
00053   vector<Double> MakeVectorDouble( UInt4 size = 0 );
00054   vector<Float>  MakeVectorFloat(  UInt4 size = 0 );
00055   vector<Int4>   MakeVectorInt4(   Int4 size = 0 );
00056   vector<UInt4>  MakeVectorUInt4(  UInt4 size = 0 );
00057   vector<Int2>   MakeVectorInt2(   Int2 size = 0 );
00058   vector<UInt2>  MakeVectorUInt2(  UInt2 size = 0 );
00059   vector<string> MakeVectorString( UInt4 size = 0 ); 
00060   vector<bool>   MakeVectorBool( UInt4 size = 0 );
00061 
00062   vector<string> ReadVectorString( string FileName );
00063 
00064   vector<Double> *MakeVectorDoubleP( UInt4 size = 0 );
00065   vector<Float>  *MakeVectorFloatP(  UInt4 size = 0 );
00066   vector<Int4>   *MakeVectorInt4P(   Int4 size = 0 );
00067   vector<UInt4>  *MakeVectorUInt4P(  UInt4 size = 0 );
00068   vector<Int2>   *MakeVectorInt2P(   Int2 size = 0 );
00069   vector<UInt2>  *MakeVectorUInt2P(  UInt2 size = 0 );
00070   vector<string> *MakeVectorStringP( UInt4 size = 0 ); 
00071   vector<bool>   *MakeVectorBoolP( UInt4 size = 0 ); 
00072   
00073   Double *VectorToArray( vector<Double> v );
00074   Float  *VectorToArray( vector<Float>  v );
00075   Int4   *VectorToArray( vector<Int4>   v );
00076   UInt4  *VectorToArray( vector<UInt4>  v );
00077   Int2   *VectorToArray( vector<Int2>   v );
00078   UInt2  *VectorToArray( vector<UInt2>  v );
00079   string *VectorToArray( vector<string> v ); 
00080   bool   *VectorToArray( vector<bool> v ); 
00081 
00082 
00083   pair<Double,Double> MakeDoubleDoublePair( Double First, Double Second );
00084 };
00085 
00086 #endif
 All Classes Functions Variables Friends