Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » PROPOSAL: linear Scaler helper for different min/max domains
Re: PROPOSAL: linear Scaler helper for different min/max domains [message #29959 is a reply to message #29943] Wed, 01 December 2010 15:54 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3443
Registered: August 2008
Senior Veteran
Hello Kohait

This could be other focus, perhaps more algebraic Smile. Just a draft:

class Function2D {
	virtual double GetX(double y) {};		// Get the first value
	virtual double GetY(double x) {};
	virtual Array <double> GetX(double y) {};	// Get all values
	virtual Array <double> GetY(double x) {};
};

class Line : public Function2D {
private:
	Point p1, p2;

public:
	Line(Point p1, Point p2) : p1(p1), p2(p2) {};
	
	virtual double GetX(double y);
	virtual double GetY(double x);
};

class Polynomial : public Function2D {
public:
	Polynomial(Point p1, ...);	// Polynomial defined by points
	Polynomial(double coeff, ...);	// Polynomial defined by coefficients
};

... other functions ...


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Slight changes in DHCtrl
Next Topic: HELPER: Value grouping to ValueArray
Goto Forum:
  


Current Time: Wed Aug 27 19:43:02 CEST 2025

Total time taken to generate the page: 0.06192 seconds