vnl_file_vector.h
Go to the documentation of this file.
1 // This is core/vnl/vnl_file_vector.h
2 #ifndef vnl_file_vector_h_
3 #define vnl_file_vector_h_
4 //:
5 // \file
6 // \brief Load vnl_vector<T> from file
7 // \author Andrew W. Fitzgibbon, Oxford RRG
8 // \date 23 Dec 96
9 //
10 // \verbatim
11 // Modifications
12 // fsm created by modifying class FileMatrix
13 // LSB (Manchester) 23/3/01 Tidied documentation
14 // \endverbatim
15 //
16 //-----------------------------------------------------------------------------
17 
18 #include <vnl/vnl_vector.h>
19 #include "vnl/vnl_export.h"
20 
21 //: Templated class to load a vector from a file.
22 template <class T>
23 class VNL_EXPORT vnl_file_vector : public vnl_vector<T>
24 {
25  private:
26 
27  public:
28  vnl_file_vector(char const* filename);
29 
30  explicit operator bool () const
31  { return (ok_)? true : false; }
32  bool operator!() const
33  { return !ok_; }
34 
35  private:
36  bool ok_;
37 };
38 
39 #endif // vnl_file_vector_h_
Templated class to load a vector from a file.
Mathematical vector class, templated by type of element.
Definition: vnl_fwd.h:16