aboutsummaryrefslogtreecommitdiff
path: root/ops.go
diff options
context:
space:
mode:
Diffstat (limited to 'ops.go')
-rw-r--r--ops.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/ops.go b/ops.go
index bca0acd..7d35e0d 100644
--- a/ops.go
+++ b/ops.go
@@ -63,14 +63,14 @@ func (m Element) mul(n Element) Element {
return m.prev().mul(n).add(n)
}
-// Pot defines power function
-func Pot(m, n Element) Element { return m.pot(n) }
+// Pow defines power function
+func Pow(m, n Element) Element { return m.pow(n) }
-func (m Element) pot(n Element) Element {
+func (m Element) pow(n Element) Element {
if n == zero {
return one
}
- return m.pot(n.prev()).mul(m)
+ return m.pow(n.prev()).mul(m)
}
// Sub defines substraction
@@ -93,8 +93,8 @@ func (m Element) String() string {
return fmt.Sprint(m.Value)
}
-// Scan returns n-th Element
-func Scan(n int) Element {
+// Index returns n-th Element
+func Index(n int) Element {
if n > alphabet.Len() {
log.Fatal("out of range ", n)
return Element{}