avl tree

Z

Zunbeltz Izaola

Hi,

I'm trying to install avl module from
http://www.nightmare.com/squirl/python-ext/avl

and i had the following instruction to install

Building:

Unix:
First, cd $(AVL_LIB), then 'make libavl.a'

Then copy AVLmodule.c into your Modules directory.
add a few lines like this to your Python/Modules/Setup file.
---------------------------------------------------------------------------
# avl module
AVL_LIB=/usr/src/other-homes/rushing/python/avl
avl AVLmodule.o -DDEBUG_AVL -I$(AVL_LIB) -L$(AVL_LIB) -lavl
-------------------------------------------------------------

I have build livavl.a, but i don't understan where is Python/Modules/Setup
and where goes the AVLModule.c file goes.


Could anyone help me,

Thanks,

Zunbeltz
 
G

Guest

Zunbeltz Izaola said:
Hi,

I'm trying to install avl module from
http://www.nightmare.com/squirl/python-ext/avl

and i had the following instruction to install

Building:

Unix:
First, cd $(AVL_LIB), then 'make libavl.a'

Then copy AVLmodule.c into your Modules directory.
add a few lines like this to your Python/Modules/Setup file.

I'm afraid you won't be happy with the code. It's very old and likely
won't compile. We have an inhouse version of this module which
compiles and run on Sparc solaris (32 Bit) and linux x86 with Python
up to 2.4. I fixed some warnigs just today for compilation on Linux
x86_64, it also seems to work on this platform now. Installation is
setup.py based. I'm quite sure we once sent patches to Sam Rushing,
but they never made it into his release. I'll try to publish our
version the next days.

Regards
Berthold
 
Z

Zunbeltz Izaola

I'm afraid you won't be happy with the code. It's very old and likely
won't compile. We have an inhouse version of this module which
compiles and run on Sparc solaris (32 Bit) and linux x86 with Python
up to 2.4. I fixed some warnigs just today for compilation on Linux
x86_64, it also seems to work on this platform now. Installation is
setup.py based. I'm quite sure we once sent patches to Sam Rushing,
but they never made it into his release. I'll try to publish our
version the next days.

Thanks. I will be looking forward to the release.

regards,

Zunbeltz
 
Z

Zunbeltz Izaola


Thanks i will play with it. But i have realize that what i need was
exactly a binary tree. I haven't used tree yet and i don't know if i
can use the avl instaead an ordinary binary tree.
I have to construct a tree like this

A

B C

A C A B

B C A B B C A C


but i think i can construct a avl using left/right. Am I correct?

Thanks again,

Zunbeltz
 
G

Guest

Zunbeltz Izaola said:
Thanks i will play with it. But i have realize that what i need was
exactly a binary tree. I haven't used tree yet and i don't know if i
can use the avl instaead an ordinary binary tree.
I have to construct a tree like this

A

B C

A C A B

B C A B B C A C


but i think i can construct a avl using left/right. Am I correct?

The point with AVL trees is, that they are self balancing, If you want
to 'define' the structure of the tree, you have to find another
solution.

Berthold
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top