SERVING THE QUANTITATIVE FINANCE COMMUNITY

Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### circle-ellipse inheritance problem

QuoteOriginally posted by: outrunYes circle <-> square mapping uses elementary functions.Can you write down the formula so that we are praying from the same page. It might be useful for Collector in his quest for the holy elixir of squaring the circle.
Last edited by Cuchulainn on February 23rd, 2016, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### circle-ellipse inheritance problem

QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunYes circle <-> square mapping uses elementary functions.Can you write down the formula so that we are praying from the same page.Egthis page gives this oneDoes this mapping have an inverse? e.g. take x' = y' = 0 then looks like a whole bunch(5) of solutions, some of which are outside the unit square. It's a quartic equation(s) in x and y. Which properties are preserved by this mapping?
Last edited by Cuchulainn on February 23rd, 2016, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

mj
Posts: 3449
Joined: December 20th, 2001, 12:32 pm

### circle-ellipse inheritance problem

Sorry to be late to the discussion. I suspect the interviewer of the OP was getting at the Liskov sustainability principle. The idea is that the inherited class should support all the methods of the base class. An ellipse naturally has methods to set the major and minor axes sizes but a circle does not. So it should not be inherited from an ellipse.

Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### circle-ellipse inheritance problem

The LSP is an object-centred idiom and somewhat outdated?. Using Functional style it will work with any function with a given syntax, and is more flexible. It means you can use any style without needing inheritance.LSP forces you to create tree structures which seem to be going out of fashion. 'Semi-lattice' structures maybe?
Last edited by Cuchulainn on April 13th, 2016, 10:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: circle-ellipse inheritance problem

Pen-Apple-PineApple-Pen

Nowadays the design should be generic and orthogonal. Whatever that means
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On