/usr/share/gap/pkg/guava/lib/codemisc.gd is in gap-guava 3.13+ds-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | #############################################################################
##
#A codemisc.gd GUAVA library Reinald Baart
#A Jasper Cramwinckel
#A Erik Roijackers
#A Eric Minkes
##
## This file contains miscellaneous functions for codes
##
########################################################################
##
#F CodeWeightEnumerator( <code> )
##
## Returns a polynomial over the rationals
## with degree not greater than the length of the code.
## The coefficient of x^i equals
## the number of codewords of weight i.
##
DeclareOperation("CodeWeightEnumerator", [IsCode]);
########################################################################
##
#F CodeDistanceEnumerator( <code>, <word> )
##
## Returns a polynomial over the rationals
## with degree not greater than the length of the code.
## The coefficient of x^i equals
## the number of codewords with distance i to <word>.
DeclareOperation("CodeDistanceEnumerator",
[IsCode, IsCodeword]);
########################################################################
##
#F CodeMacWilliamsTransform( <code> )
##
## Returns a polynomial with the weight
## distribution of the dual code as
## coefficients.
##
DeclareOperation("CodeMacWilliamsTransform", [IsCode]);
########################################################################
##
#F WeightVector( <vector> )
##
## Returns the number of non-zeroes in a vector.
DeclareOperation("WeightVector", [IsVector]);
########################################################################
##
#F RandomVector( <len> [, <weight> [, <field> ] ] )
##
DeclareOperation("RandomVector", [IsInt, IsInt, IsField]);
########################################################################
##
#F IsSelfComplementaryCode( <code> )
##
## Return true if <code> is a complementary code, false otherwise.
## A code is called complementary if for every v \in <code>
## also 1 - v \in <code> (where 1 is the all-one word).
##
DeclareProperty("IsSelfComplementaryCode", IsCode);
########################################################################
##
#F IsAffineCode( <code> )
##
## Return true if <code> is affine, i.e. a linear code or
## a coset of a linear code, false otherwise.
##
DeclareProperty("IsAffineCode", IsCode);
########################################################################
##
#F IsAlmostAffineCode( <code> )
##
## Return true if <code> is almost affine, false otherwise.
## A code is called almost affine if the size of any punctured
## code is equal to q^r for some integer r, where q is the
## size of the alphabet of the code.
##
DeclareProperty("IsAlmostAffineCode", IsCode);
########################################################################
##
#F IsGriesmerCode( <code> )
##
## Return true if <code> is a Griesmer code, i.e. if
## n = \sum_{i=0}^{k-1} d/(q^i), false otherwise.
##
DeclareProperty("IsGriesmerCode", IsCode);
########################################################################
##
#F CodeDensity( <code> )
##
## Return the density of <code>, i.e. M*V_q(n,r)/(q^n).
##
DeclareAttribute("CodeDensity", IsCode);
########################################################################
##
#F DecreaseMinimumDistanceUpperBound( <C>, <s>, <iteration> )
##
## Tries to compute the minimum distance of C.
## The algorithm is Leon's, see for more
## information his article.
DeclareOperation("DecreaseMinimumDistanceUpperBound",
[IsCode, IsInt, IsInt]);
|