Re: [GENERAL] intarray internals

2006-05-08 Thread Tom Lane
Volkan YAZICI <[EMAIL PROTECTED]> writes: > [I'm trying to share some of my thoughts about intarray contrib module. > If this is the wrong way to achieve this, please warn me. (Should I > first get in touch with Teodor Sigaev and Oleg Bartunov?)] Well, they're definitely the people most qualified

Re: [GENERAL] intarray internals

2006-05-08 Thread Volkan YAZICI
Hi, [I'm trying to share some of my thoughts about intarray contrib module. If this is the wrong way to achieve this, please warn me. (Should I first get in touch with Teodor Sigaev and Oleg Bartunov?)] [6] _int_same() in _int_op.c looks like making some redundant sorting and not taking advantage

Re: [GENERAL] intarray internals

2006-05-07 Thread Volkan YAZICI
Hi, I've prepared a Quick & Dirty patch serie for some missing parts in intarray contrib module. Here they go with some explanation... On May 06 12:38, Volkan YAZICI wrote: > [4] > In the inner_int_contains() function of _int_tool.c, there's a while > loop like > > [Code assumes that arrays are

Re: [GENERAL] intarray internals

2006-05-06 Thread Martijn van Oosterhout
On Sat, May 06, 2006 at 05:38:24PM +0300, Volkan YAZICI wrote: > > Well, it's probably trying to undo whatever g_int_compress. If you can > > explain the algorithm used it will probably be clearer. > > Actually, algorithms used in the g_int_compress() and g_int_decompress() > methods are quite awe

Re: [GENERAL] intarray internals

2006-05-06 Thread Volkan YAZICI
On May 06 05:38, Volkan YAZICI wrote: > g_int_compress(): > if (integer array length > constant limit) > { > Transfrom {A, B, C, ..., Z} array into > {A, A, B, B, ..., Z, Z} > > while (integer array length > constant limit) > { > Select two couples whose difference is min

Re: [GENERAL] intarray internals

2006-05-06 Thread Volkan YAZICI
Hi, First, thanks so much for your response. On May 06 12:13, Martijn van Oosterhout wrote: > On Sat, May 06, 2006 at 12:46:01AM +0300, Volkan YAZICI wrote: > > [1] > > What's the function of execute() in _int_bool.c? As far as I can > > understand, some other functions (eg. execconsistent()) cal

Re: [GENERAL] intarray internals

2006-05-06 Thread Martijn van Oosterhout
On Sat, May 06, 2006 at 12:46:01AM +0300, Volkan YAZICI wrote: > [1] > What's the function of execute() in _int_bool.c? As far as I can > understand, some other functions (eg. execconsistent()) calling > execute() with specific check methods (like checkcondition_bit()) but > I still couldn't figure

Re: [GENERAL] intarray internals

2006-05-06 Thread Volkan YAZICI
On May 06 12:46, Volkan YAZICI wrote: > I'm reading through the source code of intarray contrib module. Despite > being at the beginning, I've some questions to ask. I'd be so > appreciated if anybody can help. Sorry, I forgot one: [4] In the inner_int_contains() function of _int_tool.c, there's