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.

154 • Chapter 3: <strong>Programming</strong> with ModulesSummary With generic programming you need only implement computationin quotient fields or groups once — in the constructors and genericprocedures. The functor QuotientField and the various generic groupconstructors and procedures are parameterized by the computational domainsupon which their computed values depend. Rings, fields, groups,and subgroups are collections of computational capabilities, which youuse to construct new instances with derived computational capabilities.Overriding default methods (which may not be efficient, but are alwayspresent) with methods that take advantage of specific structural informationallows for efficient computation without sacrificing generality. Thisleads to a powerful paradigm for software reuse, and is the principal motivationunderlying the Maple module system.3.7 ConclusionThis chapter introduced the concept of Maple modules. It described thestructure and flexibility of modules.Encapsulation and generic programming with modules allow you towrite code that can be reused, transported, and easily maintained. Bycollecting procedures into a module called a package, you can organizeyour procedures into distinct sets of related functions. You can also usemodules to implement objects in Maple.

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

Saved successfully!

Ooh no, something went wrong!