[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.98 and 1.99

version 1.98, 2016/03/31 08:43:25 version 1.99, 2016/12/02 02:12:00
Line 44 
Line 44 
  * 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.97 2016/03/31 07:33:32 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/dp.c,v 1.98 2016/03/31 08:43:25 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "base.h"  #include "base.h"
Line 2498  void Pdp_weyl_gr_mod_main(NODE arg,LIST *rp)
Line 2498  void Pdp_weyl_gr_mod_main(NODE arg,LIST *rp)
   
 VECT current_dl_weight_vector_obj;  VECT current_dl_weight_vector_obj;
 int *current_dl_weight_vector;  int *current_dl_weight_vector;
   int dp_negative_weight;
   
 void Pdp_set_weight(NODE arg,VECT *rp)  void Pdp_set_weight(NODE arg,VECT *rp)
 {  {
Line 2510  void Pdp_set_weight(NODE arg,VECT *rp)
Line 2511  void Pdp_set_weight(NODE arg,VECT *rp)
         else if ( !ARG0(arg) ) {          else if ( !ARG0(arg) ) {
                 current_dl_weight_vector_obj = 0;                  current_dl_weight_vector_obj = 0;
                 current_dl_weight_vector = 0;                  current_dl_weight_vector = 0;
           dp_negative_weight = 0;
                 *rp = 0;                  *rp = 0;
         } else {          } else {
                 if ( OID(ARG0(arg)) != O_VECT && OID(ARG0(arg)) != O_LIST )                  if ( OID(ARG0(arg)) != O_VECT && OID(ARG0(arg)) != O_LIST )
Line 2528  void Pdp_set_weight(NODE arg,VECT *rp)
Line 2530  void Pdp_set_weight(NODE arg,VECT *rp)
                 current_dl_weight_vector = (int *)CALLOC(n,sizeof(int));                  current_dl_weight_vector = (int *)CALLOC(n,sizeof(int));
                 for ( i = 0; i < n; i++ )                  for ( i = 0; i < n; i++ )
                         current_dl_weight_vector[i] = QTOS((Q)v->body[i]);                          current_dl_weight_vector[i] = QTOS((Q)v->body[i]);
           for ( i = 0; i < n; i++ )
               if ( current_dl_weight_vector[i] < 0 ) break;
           if ( i < n )
               dp_negative_weight = 1;
           else
               dp_negative_weight = 0;
                 *rp = v;                  *rp = v;
         }          }
 }  }

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.99

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