Skip to main content
gamedev.net
🔒 Locked

critticall

Started by original vesoljc Jun 19, 2003 at 3:43 PM 9 replies 900+ views
Original Post
original vesoljc
original vesoljc
http://www.critticall.com/ how they say it? singularity here i come...
Abnormal behavior of abnormal brain makes me normal...
Shannon Barber
Shannon Barber
That algorithm needed a little help, I had to figure out the initialization values for i & j (and l clearly doesn''y matter).


template<class RI>
void jitter_sort(RI begin, RI end)
{
int n = (int)(end-begin); --n;

int o=0, p=1, k=1, i=0, j=1, l;
while(k>=i)
{
k=-1;
while(n>k)
{
k++; l=(&*begin)[k];
if(j>l)
{
(&*begin)[i]=l; i++; (&*begin)[k]=j;
}
if(l>j)
{
i=k; j=(&*begin)[k];
}
}
j=0; n=i-p;
}
}
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
nevone
nevone
Sort from the site critticall.com for several unique records, works only for numbers greater or equal to zero. What shouldn''t be a problem since an addition and a subtraction to all members of the array, is not hard to perform.

Generally, all variables used in c-critticall language are by default int type set to 0. So, variable j should be set to zero if we want to sort numbers of values from 0 to n.

0+ nevone
Let''s do it!
original vesoljc
original vesoljc
quote:
Original post by Anonymous Poster
We need to create games that will fit postsingularity era.


i''m doing my best
Abnormal behavior of abnormal brain makes me normal...
nevone
nevone
Hope so.

Critticall is a program that helps you to improve engines for that kind of games.


o+nevone
Let''s do it!
Shannon Barber
Shannon Barber
quote:
Original post by nevone
Sort from the site critticall.com for several unique records, works only for numbers greater or equal to zero. What shouldn''t be a problem since an addition and a subtraction to all members of the array, is not hard to perform.

Generally, all variables used in c-critticall language are by default int type set to 0. So, variable j should be set to zero if we want to sort numbers of values from 0 to n.

0+ nevone


IIRC, it creates an infinite loop if j is initialized to 0.
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.