aboutsummaryrefslogtreecommitdiff
path: root/ops.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-01-28 22:31:43 +0100
committerDimitri Sokolyuk <demon@dim13.org>2017-01-28 22:31:43 +0100
commit7d96315b115e965cbb57c7b515fd2985888f7646 (patch)
tree7e546c51df79667b7bb90469e08864c3baba0a5f /ops.go
parent2489f58cc6dab3acbd0bd4f9c1b5bc5cb158f7d8 (diff)
Some renames
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{}