File: codeword.gd

package info (click to toggle)
guava 3.6-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 11,788 kB
  • ctags: 2,359
  • sloc: ansic: 20,846; xml: 10,043; sh: 2,855; makefile: 388
file content (102 lines) | stat: -rw-r--r-- 3,756 bytes parent folder | download
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
#############################################################################
##
#A  codeword.gd            GUAVA library                       Reinald Baart
#A                                                        &Jasper Cramwinckel
#A                                                           &Erik Roijackers
##
##  This file contains functions for working with codewords
##
#H  @(#)$Id: codeword.gd,v 1.5 2003/02/12 03:49:18 gap Exp $
##
Revision.("guava/lib/codeword_gd") :=
    "@(#)$Id: codeword.gd,v 1.5 2003/02/12 03:49:18 gap Exp $";

#############################################################################
##
#F  IsCodeword( <v> ) . . . . . . . . . . . . . . . .  codeword category 
##
DeclareCategory("IsCodeword", IsRowVector); 
DeclareCategoryCollections("IsCodeword"); 

#############################################################################
##
#F  Codeword( <list> [, <F>] or . . . . . . . . . . . .  creates new codeword
#F  Codeword( <P> [, <n>] [, <F>] ) . . . . . . . . . . . . . . . . . . . . .
##  Codeword( <P>, Code)  . . . . . . . . . . . . . . . . . . . . . . . . . .
##
DeclareOperation("Codeword", [IsObject, IsInt, IsFFE]);

#############################################################################
##
#F  Support( <v> )  . . . . . . . set of coordinates in which <v> is not zero
##
DeclareAttribute("Support", IsCodeword); 

#############################################################################
##
#F  TreatAsPoly( <v> )  . . . . . . . . . . . .  treat codeword as polynomial
##
##  The codeword <v> will be treated as a polynomial
##
DeclareOperation("TreatAsPoly", [IsCodeword]);

#############################################################################
##
#F  TreatAsVector( <v> )  . . . . . . . . . . . .  treat codeword as a vector
##
##  The codeword <v> will be treated as a vector
##
DeclareOperation("TreatAsVector", [IsCodeword]);

#############################################################################
##
#F  PolyCodeword( <arg> ) . . . . . . . . . . converts input to polynomial(s)
##
## Input may be codeword, polynomial, vector or a list of those
##  
DeclareAttribute("PolyCodeword", IsCodeword); 

#############################################################################
##
#F  VectorCodeword( <arg> ) . . . . . . . . . . . .  converts input to vector
##
## Input may be codeword, polynomial, vector or a list of those
## 
DeclareAttribute("VectorCodeword", IsCodeword); 

#############################################################################
##
#F  Weight( <v> ) . . . . . . . . . . . calculates the weight of codeword <v>
##
DeclareAttribute("Weight", IsCodeword); 

#############################################################################
##
#F  WeightCodeword( <v> ) . . . . . . . calculates the weight of codeword <v>
##
DeclareSynonymAttr("WeightCodeword", Weight);

#############################################################################
##
#F  DistanceCodeword( <a>, <b> )  . the distance between codeword <a> and <b>
##
DeclareOperation("DistanceCodeword", [IsCodeword, IsCodeword]); 

#############################################################################
##
#F  NullWord( <C> ) or NullWord( <n>, <F> ) . . . . . . . . . . all zero word
##
DeclareOperation("NullWord", [IsInt, IsFFE]); 

#############################################################################
##
## Zero(<w>) .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  zero codeword
##

#############################################################################
##
#F  WordLength( <v> ) . . . . . . . . . stores the wordlength of codeword <v>
## 			Currently no method to calculate.  Assumed to be set at creation. 
DeclareAttribute("WordLength", IsCodeword);