11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.6 Interfaces and Implementations • 147> GroupOrder( C );4Note that, when the argument G is neither a group nor a subgroup, theprocedure GroupElements returns unevaluated. This allows you to extendother Maple operations, such as expand, combine or simplify to be effectiveon algebraic expressions involving unevaluated calls to GroupOrder.Matrix Groups So far, all the groups have been permutation groupsreturned by one of the constructors previously presented. You must testthe code on some other kinds of groups. A good source for examples offinite groups are the finite groups of exact matrices.Equality and Membership Tests for Matrices Because distinct matriceswith equal entries compare differently using the Maple equality comparisonoperator ‘=‘, it is necessary to implement a specialized test formembership in a set. For example, consider the matrices> A := Matrix( [[1,0],[0,1]] );[ ] 1 0A :=0 1> B := Matrix( [[2,3],[3,4]] );[ ] 2 3B :=3 4> C := Matrix( [[1,0],[0,1]] );[ ] 1 0C :=0 1Both A and C have the same entries, and represent mathematicallyidentical objects. However, because matrices are mutable data structures(necessary for efficiency in matrix computations), they are distinct asMaple objects. Thus, for instance:> member( A, { B, C } );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!