vertical_segment.h 1.63 KB
Newer Older
1 2 3 4 5 6 7
#pragma once

// Include STL
#include <vector>
#include <string>

// Interface
8
#include "common.h"
9 10 11 12 13 14 15 16 17 18 19
#include "function.h"
#include "data.h"
#include "fitter.h"
#include "args.h"

class vertical_segment : public data
{
	public: // methods

		// Load data from a file
		virtual void load(const std::string& filename) ;
20 21 22 23 24 25 26 27 28 29

        //! \brief Load data from a file using the command line arguments
        //!
        //! \details
        //! Specific arguments for the vertical segment data
        //!   --dt specify a value for the absolute/relative segment if not defined
        //!        in the data
        //!   --data-positive for the data to be positive
        //!   --dt-relative use a relative segment intervale. The dt is used
        //!     multipled by the data
30 31
		virtual void load(const std::string& filename, const arguments& args) ;

32

33
		// Acces to data
34 35
		virtual vec get(int i) const ;		
		virtual vec operator[](int i) const ;
36
		virtual vec value(vec, vec) const 
37
		{
38
			NOT_IMPLEMENTED();
39
		}
40
        virtual vec value(vec) const
41 42 43
        {
            NOT_IMPLEMENTED();
        }
44 45 46

		//! \brief Put the sample inside the data
		virtual void set(vec x);
47 48 49 50 51 52 53 54 55
		
		//! \brief Specific accessor to a vertical segment, this gives the
		//! complete vector, plus the ordinate segment
		virtual void get(int i, vec &x, vec &yl, vec &yu) const ;

		//! \brief Specific accessor to a vertical segment. Provides only the 
		//! ordinate segment.
		virtual void get(int i, vec& yl, vec& yu) const ;		

56 57 58 59 60 61 62 63 64 65 66

		// Get data size
		virtual int size() const ;

	private: // data

		// Store for each point of data, the upper
		// and lower value
		std::vector<vec> _data ;
} ;