Search found 11 matches

by katoussa
Thu May 27, 2010 2:15 pm
Forum: Language Issues
Topic: GROUP BY bug
Replies: 4
Views: 26746

GROUP BY bug

Hi, I want to do the translate for this code: Select Count (d1.id_personne), d2.id_personne FROM deplacement d1, deplacement d2 GROUP BY d2.id_personne With tutorial D I can use SUMMARIZE TO HAVE THE RESULT OF GROUP BY but with summarize Rel don't accept parameters in COUT ON THE SUMMARIZE SYNTAX. I...
by katoussa
Tue May 11, 2010 2:06 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

I want to have the persons who have encountered the greatest number of people FROM RELATION (Suivi_Personnes). I wrote this: (Suivi_Personnes WHERE MAX (EXTEND Suivi ADD (WITH ((Suivi WHERE DISTANCE (Id_S, Id_Personnes)<10 and Heure_S=Heure and Id_Personnes_S<>Id_Personnes ){Id_S} ) AS T : COUNT (T ...
by katoussa
Mon May 10, 2010 7:22 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

How Can I have the minimum of values of Id of Batiments? MIN(Batiments, Id) And How Can I have the minimum Of Distance between some value (for example 1) and the values of Id of the relation Batiments? Is this what you have in mind? MIN(EXTEND Batiments ADD (DISTANCE(1, Id) AS Distance), Distance) ...
by katoussa
Mon May 10, 2010 2:08 am
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

I have this Relation: VAR Batiments REAL RELATION {Id integer, Nom char, Polygon Polygon} KEY {Id}; How Can I have the minimum of values of Id of Batiments? And How Can I have the minimum Of Distance between some value (for example 1) and the values of Id of the relation Batiments? SOME THING LIKE :...
by katoussa
Mon May 10, 2010 1:18 am
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

I have to define an array with all distances between two things. Then by giving two ids as parameters the operator returns the distance between this two things through ids. I don't know haw to write it. Thanks. Using your original example as a guideline (and with no guarantee that your original was...
by katoussa
Sun May 09, 2010 3:42 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

I want to understand where is the problem? The Tutorial D INTEGER type is not directly compatible with the Java int type. To convert a Java int (or long) 'x' to an INTEGER (which is represented by ValueInteger in Java): ValueInteger.select(context.getGenerator(), x) To convert a ValueInteger 'x' to...
by katoussa
Sun May 09, 2010 3:29 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

OPERATOR COMPARE(RELATION {id1 INTEGER}, RELATION{id2 INTEGER}) RETURNS INTEGER Java FOREIGN
IF (id1>id2) RETURN id1;
ELSE RETURN id2;

END OPERATOR;

I want to compare two ids of relations.
by katoussa
Sat May 08, 2010 11:41 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Re: Create OPERATOR BUG

How can I define an Operator who compare two Ids of 2 relations like this:


OPERATOR COMPARE(RELATION {id INTEGER}, RELATION{id INTEGER}) RETURNS INTEGER Java FOREIGN
RETURN id;

END OPERATOR;


??
by katoussa
Sat May 08, 2010 10:41 pm
Forum: Language Issues
Topic: Create OPERATOR BUG
Replies: 13
Views: 23103

Create OPERATOR BUG

I want to create en OPERATOR: OPERATOR DISTANCE(i1 INTEGER, i2 INTEGER) RETURNS INTEGER Java FOREIGN int[][] T = new int[32][32]; for (int i=1; i<33; i++) { for(int j=1;j<33;j++) { T [j]=0; } } T[1][2]=4; T[1][3]=4; T[1][4]=3; T[1][5]=7; T[1][6]=14; T[1][8]=6; T[1][11]=7; T[1][14]=9; T[1][15]=10; T[...
by katoussa
Wed May 05, 2010 11:18 pm
Forum: Language Issues
Topic: Trouble with TYPE
Replies: 11
Views: 17456

Re: Trouble with TYPE

Is there a way to do what I want ? Yes. Your approach using two POSSREPs in one type won't work because Line2p and LineInfinite are not equivalent. What I think you want is this: TYPE Line UNION; TYPE Line2p IS {Line POSSREP {p1 Point, p2 Point}}; TYPE LineInfinite IS {Line POSSREP {SETOF Point}}; ...
by katoussa
Wed May 05, 2010 10:49 pm
Forum: Language Issues
Topic: Trouble with TYPE
Replies: 11
Views: 17456

Re: Trouble with TYPE

I have some trouble with the use of TYPE POINT. I define the TYPE POINT: TYPE Point POSSREP Point {Abscisse RATIONAL,Ordonne RATIONAL}; I have a relation Person with a type POINT: VAR Personnes REAL RELATION {Id integer, Nom char, Point Point} KEY {Id}; I have a problem on the insertion Person: INSE...