Equal() compares two ClassGroups using their underlying values and returns true if they are equivalent
(other *ClassGroup)
| 341 | |
| 342 | // Equal() compares two ClassGroups using their underlying values and returns true if they are equivalent |
| 343 | func (group *ClassGroup) Equal(other *ClassGroup) bool { |
| 344 | // reduce both to their simplest form |
| 345 | g := group.Reduced() |
| 346 | o := other.Reduced() |
| 347 | // compare a,b,c |
| 348 | return g.a.Cmp(o.a) == 0 && g.b.Cmp(o.b) == 0 && g.c.Cmp(o.c) == 0 |
| 349 | } |
| 350 | |
| 351 | // Discard() recycles the big ints used for the class group |
| 352 | func (group *ClassGroup) Discard() { bip.Recycle(group.a, group.b, group.c) } |