vertical_segment.h 943 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#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
		virtual bool get(int i, double& x, double& yl, double& yu) const ;
		virtual const vec& get(int i) const ;		
		virtual void get(int i, vec& yl, vec& yu) const ;		
		virtual const vec& operator[](int i) const ;

		// 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 ;
} ;