vertical_segment.h 1.28 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 20 21
#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) ;

22

23
		// Acces to data
24 25
		virtual vec get(int i) const ;		
		virtual vec operator[](int i) const ;
26 27
		virtual vec value(vec in, vec out) const 
		{
28
			NOT_IMPLEMENTED();
29
		}
30 31 32

		//! \brief Put the sample inside the data
		virtual void set(vec x);
33 34 35 36 37 38 39 40 41
		
		//! \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 ;		

42 43 44 45

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

46

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
		// 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 ;
} ;