[BACK]Return to dp.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/dp.c between version 1.41 and 1.45

version 1.41, 2003/10/08 09:38:06 version 1.45, 2003/12/25 08:46:19
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/dp.c,v 1.40 2003/09/11 09:03:52 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/dp.c,v 1.44 2003/11/27 07:53:53 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
Line 58  extern struct order_spec dp_current_spec;
Line 58  extern struct order_spec dp_current_spec;
   
 int do_weyl;  int do_weyl;
   
   void Pdp_sort();
 void Pdp_mul_trunc(),Pdp_quo();  void Pdp_mul_trunc(),Pdp_quo();
 void Pdp_ord(), Pdp_ptod(), Pdp_dtop();  void Pdp_ord(), Pdp_ptod(), Pdp_dtop();
 void Pdp_ptozp(), Pdp_ptozp2(), Pdp_red(), Pdp_red2(), Pdp_lcm(), Pdp_redble();  void Pdp_ptozp(), Pdp_ptozp2(), Pdp_red(), Pdp_red2(), Pdp_lcm(), Pdp_redble();
Line 176  struct ftab dp_tab[] = {
Line 177  struct ftab dp_tab[] = {
   
 struct ftab dp_supp_tab[] = {  struct ftab dp_supp_tab[] = {
         /* setting flags */          /* setting flags */
           {"dp_sort",Pdp_sort,1},
         {"dp_ord",Pdp_ord,-1},          {"dp_ord",Pdp_ord,-1},
         {"dp_set_kara",Pdp_set_kara,-1},          {"dp_set_kara",Pdp_set_kara,-1},
         {"dp_nelim",Pdp_nelim,-1},          {"dp_nelim",Pdp_nelim,-1},
Line 224  struct ftab dp_supp_tab[] = {
Line 226  struct ftab dp_supp_tab[] = {
         {0,0,0}          {0,0,0}
 };  };
   
   void Pdp_sort(arg,rp)
   NODE arg;
   DP *rp;
   {
           dp_sort((DP)ARG0(arg),rp);
   }
   
 void Pdp_mdtod(arg,rp)  void Pdp_mdtod(arg,rp)
 NODE arg;  NODE arg;
 DP *rp;  DP *rp;
Line 1309  Q *rp;
Line 1318  Q *rp;
                                 break;                                  break;
                         case 2:                          case 2:
                                 DP_Print = 0; DP_PrintShort = 1;                                  DP_Print = 0; DP_PrintShort = 1;
                                   break;
                         default:                          default:
                                 DP_Print = s; DP_PrintShort = 0;                                  DP_Print = s; DP_PrintShort = 0;
                                 break;                                  break;
Line 1576  LIST *rp;
Line 1586  LIST *rp;
         }          }
         m = QTOS((Q)ARG2(arg));          m = QTOS((Q)ARG2(arg));
         create_order_spec(ARG3(arg),&ord);          create_order_spec(ARG3(arg),&ord);
         nd_gr(f,v,m,&ord,rp);          nd_gr(f,v,m,0,&ord,rp);
 }  }
   
 void Pnd_weyl_gr_trace(arg,rp)  void Pnd_weyl_gr_trace(arg,rp)
Line 1765  VECT *rp;
Line 1775  VECT *rp;
 {  {
         VECT v;          VECT v;
         int i,n;          int i,n;
           NODE node;
   
         if ( !arg )          if ( !arg )
                 *rp = current_dl_weight_vector_obj;                  *rp = current_dl_weight_vector_obj;
Line 1773  VECT *rp;
Line 1784  VECT *rp;
                 current_dl_weight_vector = 0;                  current_dl_weight_vector = 0;
                 *rp = 0;                  *rp = 0;
         } else {          } else {
                 asir_assert(ARG0(arg),O_VECT,"dp_set_weight");                  if ( OID(ARG0(arg)) != O_VECT && OID(ARG0(arg)) != O_LIST )
                 v = (VECT)ARG0(arg);                          error("dp_set_weight : invalid argument");
                   if ( OID(ARG0(arg)) == O_VECT )
                           v = (VECT)ARG0(arg);
                   else {
                           node = (NODE)BDY((LIST)ARG0(arg));
                           n = length(node);
                           MKVECT(v,n);
                           for ( i = 0; i < n; i++, node = NEXT(node) )
                                   BDY(v)[i] = BDY(node);
                   }
                 current_dl_weight_vector_obj = v;                  current_dl_weight_vector_obj = v;
                 n = v->len;                  n = v->len;
                 current_dl_weight_vector = (int *)CALLOC(n,sizeof(int));                  current_dl_weight_vector = (int *)CALLOC(n,sizeof(int));

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.45

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>