From 7d96315b115e965cbb57c7b515fd2985888f7646 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 28 Jan 2017 22:31:43 +0100 Subject: Some renames --- ops.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ops.go') 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{} -- cgit v1.2.3