Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: Data struct...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 12 Topic 2726 of 3037
Post > Topic >>

Re: Data structures for cplmsi bijections

by Jon Harrop <usenet@[EMAIL PROTECTED] > Jan 13, 2008 at 09:37 PM

David B. Benson wrote:
> Consider a continuous, piecewise linear, monotonically
> strictly increasing (cplmsi) function on a real closed interval.
> Clearly this determines a bijection.
> 
> The task is to determine a data structure for the cplmsi
> function so that both functiion values and inverse function
> values can be 'quickly' determined, using only functional
> language constructs.  No imperative features allowed.

If I've understood the question correctly, your function is quantified by
a
set of points that can be linearly interpolated between. So you can
represent the sequence of points as a balanced binary tree and lookup the
bracketing points in it.

All things being equal, that is probably as efficient as you'll get.
However, it is asymptotically inefficient if the distribution of points is
strongly heterogeneous. In that case, you could either weigh subtrees
according to the length of the linear interpolations they contain, or you
could use two differently-balanced trees (one for each direction) and
weigh
by the separations in x and y respectively.

I don't know the complexity of the former but the latter should be O(log
n)
where "n" is the number of points.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
 




 12 Posts in Topic:
Data structures for cplmsi bijections
"David B. Benson&quo  2008-01-12 16:55:25 
Re: Data structures for cplmsi bijections
Barb Knox <see@[EMAIL   2008-01-13 14:48:48 
Re: Data structures for cplmsi bijections
"David B. Benson&quo  2008-01-13 10:44:07 
Re: Data structures for cplmsi bijections
jmv16@[EMAIL PROTECTED]   2008-01-13 20:58:33 
Re: Data structures for cplmsi bijections
Joachim Durchholz <jo@  2008-01-14 02:15:04 
Re: Data structures for cplmsi bijections
Jon Harrop <usenet@[EM  2008-01-13 21:37:53 
Re: Data structures for cplmsi bijections
Neelakantan Krishnaswami   2008-01-13 22:06:12 
Re: Data structures for cplmsi bijections
"David B. Benson&quo  2008-01-13 15:35:28 
Re: Data structures for cplmsi bijections
Vesa Karvonen <vesa.ka  2008-01-13 23:57:38 
Re: Data structures for cplmsi bijections
Vesa Karvonen <vesa.ka  2008-01-14 01:58:13 
Re: Data structures for cplmsi bijections
"David B. Benson&quo  2008-01-13 16:20:17 
Re: Data structures for cplmsi bijections
"David B. Benson&quo  2008-01-14 12:26:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:12:08 CDT 2008.