Changeset dabe36d in git for Singular/LIB/crypto.lib
- Timestamp:
- Apr 24, 2015, 10:10:00 AM (9 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- 769a27f375c14dbe7cac70321db6bb76ef18fb07
- Parents:
- 0e64419f9c8b5ac88636e5a328adeece695304d3
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-04-24 10:10:00+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2015-04-24 11:04:22+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/crypto.lib
r0e64419 rdabe36d 74 74 injective_knapsack(int ksize, int kmaxelement) Creates all list of all injective knapsacks of given size ksize and maximal element kmaxelement 75 75 calculate_max_sum(list a) Calculates the maximal sum of a given knapsack a 76 is_injective(list a) Checks if knapsack a is injective76 set_is_injective(list a) Checks if knapsack a is injective 77 77 is_h_injective(list a, int h) Checks if knapsack a is h-injective 78 78 is_fix_injective(list a) Checks if knapsack a is fix-injective … … 3360 3360 for(i=1;i<=size(list_of_lists);i++) 3361 3361 { 3362 if ( is_injective(list_of_lists[i])==1)3362 if (set_is_injective(list_of_lists[i])==1) 3363 3363 { 3364 3364 output_list=insert(output_list,list_of_lists[i]); … … 3393 3393 } 3394 3394 3395 proc is_injective(list a)3396 "USAGE: is_injective(a)3395 proc set_is_injective(list a) 3396 "USAGE: set_is_injective(a) 3397 3397 RETURN: 1 if a is injective, 0 otherwise 3398 EXAMPLE: is_injective; shows an example;3398 EXAMPLE: set_is_injective; shows an example; 3399 3399 " 3400 3400 { … … 3423 3423 list inj = 1,5,7,41; 3424 3424 list non_inj = 1,2,3,4; 3425 is_injective(inj);3426 is_injective(non_inj);3425 set_is_injective(inj); 3426 set_is_injective(non_inj); 3427 3427 } 3428 3428 … … 3554 3554 int condition = 0; 3555 3555 out = set_turn(out); 3556 if ( is_injective(out)==0)3556 if (set_is_injective(out)==0) 3557 3557 { 3558 3558 return(0); … … 3593 3593 list a = three_elements(super_increasing,2); 3594 3594 a; 3595 is_injective(a);3595 set_is_injective(a); 3596 3596 } 3597 3597 /*
Note: See TracChangeset
for help on using the changeset viewer.