Changeset: dd4dc7df897c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dd4dc7df897c
Modified Files:
        sql/backends/monet5/UDF/ssdb.c
Branch: ssdb
Log Message:

indentation


diffs (89 lines):

diff --git a/sql/backends/monet5/UDF/ssdb.c b/sql/backends/monet5/UDF/ssdb.c
--- a/sql/backends/monet5/UDF/ssdb.c
+++ b/sql/backends/monet5/UDF/ssdb.c
@@ -189,7 +189,7 @@ SSDBintersects(Client cntxt, MalBlkPtr m
        mvc *sql = NULL;
        sql_table *tin = NULL, *tout = NULL;
        str msg = getSQLContext(cntxt, mb, &sql, NULL);
-       str tin_name  = *(str *) getArgReference(stk, pci, pci->retc + 0);
+       str tin_name = *(str *) getArgReference(stk, pci, pci->retc + 0);
        str tout_name = *(str *) getArgReference(stk, pci, pci->retc + 1);
        int xstart = *(int *) getArgReference(stk, pci, pci->retc + 2); 
        int ystart = *(int *) getArgReference(stk, pci, pci->retc + 3);
@@ -198,7 +198,7 @@ SSDBintersects(Client cntxt, MalBlkPtr m
 
 
        int linex[] = {xstart,xstart,xstart+xlen,xstart+xlen,xstart};
-        int liney[] = {ystart,ystart+ylen,ystart+ylen,ystart,ystart};
+       int liney[] = {ystart,ystart+ylen,ystart+ylen,ystart,ystart};
 
        BAT *tin_obsid = NULL, *tin_x = NULL, *tin_y = NULL;
        BAT *tout_obsid = NULL;
@@ -251,9 +251,9 @@ SSDBintersects(Client cntxt, MalBlkPtr m
 
        /* Create BATs for all columns of the output table 'tout_obs' */
        nr_obs=tin_obsid_t[nr_points-1]+1;
-        tout_obsid = BATnew(TYPE_void, TYPE_int, nr_obs);
-        /* pointers directly to the BATs' tails */
-        tout_obsid_t = (int*)Tloc(tout_obsid, BUNfirst(tout_obsid));
+       tout_obsid = BATnew(TYPE_void, TYPE_int, nr_obs);
+       /* pointers directly to the BATs' tails */
+       tout_obsid_t = (int*)Tloc(tout_obsid, BUNfirst(tout_obsid));
 
 
        /* First pass over all input pixels, to group the pixels into
@@ -270,7 +270,7 @@ SSDBintersects(Client cntxt, MalBlkPtr m
                        y = tin_y_t[idx];
                        x_next = tin_x_t[idx+1];
                        y_next = tin_y_t[idx+1];
-       
+
                        for(j=0;j<4;j++)
                        {
 
@@ -278,15 +278,15 @@ SSDBintersects(Client cntxt, MalBlkPtr m
                                {
                                        
D=((linex[j]-linex[j+1])*(y_next-y))-((liney[j]-liney[j+1])*(x_next-x));
 
-                                       /*Find l,m using Cramer's rule*/
-                                       if(D!=0)
-                                       {
-                                               
l=(1/D)*(((x_next-linex[j+1])*(y_next-y))-((y_next-liney[j+1])*(x_next-x)));
-                                               
m=(1/D)*(((linex[j]-linex[j+1])*(y_next-liney[j+1]))-((liney[j]-liney[j+1])*(x_next-linex[j+1])));
+                                       /*Find l,m using Cramer's rule*/
+                                       if(D!=0)
+                                       {
+                                               
l=(1/D)*(((x_next-linex[j+1])*(y_next-y))-((y_next-liney[j+1])*(x_next-x)));
+                                               
m=(1/D)*(((linex[j]-linex[j+1])*(y_next-liney[j+1]))-((liney[j]-liney[j+1])*(x_next-linex[j+1])));
 
-                                               if (l>=0 && l<=1 && m>=0 && 
m<=1)
-                                               {
-                                                       cur_obs=obs;
+                                               if (l>=0 && l<=1 && m>=0 && 
m<=1)
+                                               {
+                                                       cur_obs=obs;
                                                        
tout_obsid_t[inter_obsid] = cur_obs;
                                                        inter_obsid++;
                                                }
@@ -360,10 +360,10 @@ SSDBcooking(Client cntxt, MalBlkPtr mb, 
        obs_pixels *obs_pix = NULL;
 
        str msg = getSQLContext(cntxt, mb, &sql, NULL);
-       str tin_name  = *(str *) getArgReference(stk, pci, pci->retc + 0);
+       str tin_name = *(str *) getArgReference(stk, pci, pci->retc + 0);
        str tout_obs_name = *(str *) getArgReference(stk, pci, pci->retc + 1);
        str tout_plg_name = *(str *) getArgReference(stk, pci, pci->retc + 2);
-       int width  = *(int *) getArgReference(stk, pci, pci->retc + 3);
+       int width = *(int *) getArgReference(stk, pci, pci->retc + 3);
        /* int height = *(int *) getArgReference(stk, pci, pci->retc + 4); */
 
        if (msg)
@@ -577,7 +577,7 @@ SSDBcooking(Client cntxt, MalBlkPtr mb, 
                } else {
                        distX = tin_x_t[idx] - tout_obs_centerx_t[cur_obsid];
                        distY = tin_y_t[idx] - tout_obs_centery_t[cur_obsid];
-                       wtdDistSum[cur_obsid] +=  tin_val_t[idx] * sqrt(distX * 
distX + distY * distY);
+                       wtdDistSum[cur_obsid] += tin_val_t[idx] * sqrt(distX * 
distX + distY * distY);
                }
        }
        /* Second pass over all observations to compute the average distance */
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to