SERVING THE QUANTITATIVE FINANCE COMMUNITY

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

circle-ellipse inheritance problem

February 24th, 2016, 3:55 pm

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
 
User avatar
Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

circle-ellipse inheritance problem

February 24th, 2016, 5:52 pm

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
 
User avatar
mj
Posts: 3449
Joined: December 20th, 2001, 12:32 pm

circle-ellipse inheritance problem

April 14th, 2016, 4:38 am

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.
 
User avatar
Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

circle-ellipse inheritance problem

April 14th, 2016, 7:18 am

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
 
User avatar
Cuchulainn
Posts: 61184
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: circle-ellipse inheritance problem

October 13th, 2016, 3:16 pm

Pen-Apple-PineApple-Pen
https://www.quantnet.com/threads/compil ... ost-184848

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

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

PW by JB

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


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

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


GZIP: On