I think that they are used to build apps like dbms.  An AVL tree is a balanced binany tree and allows for a very low search time in regards to tree size.  It's pretty much low-level stuff.

There is no definite parent-child relationship here, just a search element.  A traditional Binary tree does not take into account the height of the subtrees when inserting a new node.  In an AVL tree, because we are looking to minimize search time, when a new node is added, every the heights of every sub tree are evaluated and the nodes are shifted until it is determined that the heights of each left-right pair of subtrees are within 1.  

What happens is that we are really trying to get lessen the chance that we will have to go down many branches of a tree before we reach the result.  Balancing the tree does this for us.


- Matt Small


  ----- Original Message -----
  From: jon hall
  To: CF-Community
  Sent: Wednesday, October 01, 2003 3:23 PM
  Subject: Re: CF Salary Range


  Oh cool...new tree type...I've been really interested in them as of
  late. Definitely one of those topics where a CS education is
  necessary.
  But, if you wouldn't mind humoring me, what kinds of applications
  could use a balanced tree like AVL?
  >From this page
  http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/AVL.html it seems
  from the graphic that 'rotating' to keep the balance kills the
  parent-child relationship, which would seem to be a bad thing.

  --
  jon
  mailto:[EMAIL PROTECTED]

  Wednesday, October 1, 2003, 2:47:10 PM, you wrote:
  MS> Hmmm... ok.  But nobody's creating any linked lists or AVL trees using CF, at least as far as I know.

  MS> - Matt Small
  MS>   ----- Original Message -----
  MS>   From: S. Isaac Dealey
  MS>   To: CF-Community
  MS>   Sent: Wednesday, October 01, 2003 2:34 PM
  MS>   Subject: Re: CF Salary Range


  MS>   They apply in CF -- but not the same way they do in C++ ...

  MS>   <cfset iam = astructure>

  MS>   vs.

  MS>   <cfset iam = duplicate(astructure)>



  MS>   > I was just thinking that as well.  Of course, pointers are
  MS>   > not applicable in CF nor in Java.  Come to think of it,
  MS>   > I've never used them in Visual Basic either, but I sure
  MS>   > did use them a lot in C++.  If you can get pointers,
  MS>   > you're a true programmer.  I'm not saying that they are
  MS>   > difficult to understand, just that I would consider that
  MS>   > the line between a true programmer and a wannabe.


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to