vertical_segment.h 926 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#pragma once

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

// Interface
#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) ;
		virtual void load(const std::string& filename, const arguments& args) ;

		// Acces to data
22
        virtual void get(int i, vec &x, vec &yl, vec &yu) const ;
23
		virtual vec get(int i) const ;		
24
		virtual void get(int i, vec& yl, vec& yu) const ;		
25
		virtual vec operator[](int i) const ;
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

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

		// Get min and max input parameters
		virtual vec min() const ;
		virtual vec max() const ; 

	private: // data

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

		// Store the min and max value on the input
		// domain
		vec _min, _max ;
} ;