Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .

Preface
Audience
Worksheet Graphical Interface
Manual Set
Conventions
Customer Feedback
1 Procedures, Variables, and Extending Maple
Prerequisite Knowledge
In This Chapter
1.1 Nested Procedures
Scoping Rules
Local Versus Global Variables
The Quick-Sort Algorithm
Example
Creating a Uniform Random Number Generator
1.2 Procedures That Return Procedures
Conveying Values
Creating a Newton Iteration
Example 1
Example 2
A Shift Operator
1.3 Local Variables and Invoking Procedures
Procedure as a Returned Object
Example 3
Example 4
Exercises
1.4 Interactive Input
Converting Strings to Expressions
Extending Commands
1.6 Conclusion
2 Programming with Modules
Modules
Examples
Module Versus Procedure
Accessing Module Exports
2.1 Syntax and Semantics
The Module Deﬁnition
The Module Body
Module Parameters
Named Modules
Declarations
Exported Local Variables
Module Options
Implicit Scoping Rules
Lexical Scoping Rules
Modules and Types
Example: A Symbolic Diﬀerentiator
2.2 Records
2.3 Packages
What Is a Package
Writing Maple Packages by Using Modules
The Shapes Package
2.4 The use Statement
Operator Rebinding
2.5 Modeling Objects
Priority Queues
An Object-oriented Shapes Package
2.6 Interfaces and Implementations
Interfaces
Generic Graph Algorithms
Quotient Fields
A Generic Group Implementation
2.7 Extended Example: A Search Engine
Introduction to Searching
Inverted Term Occurrence Indexing
The Vector Space Model
Term Weighting
Building a Search Engine Package
Latent Semantic Analysis
The Search Engine Package
Using the Package
2.8 Conclusion
3 Input and Output
3.1 A Tutorial Example
3.2 File Types and Modes
Buﬀered Files versus Unbuﬀered Files
Text Files versus Binary Files
The default and terminal Files
3.3 File Descriptors versus File Names
3.4 File Manipulation Commands
Opening and Closing Files
Detecting the End of a File
Determining File Status
Removing Files
3.5 Input Commands
Reading Text Lines from a File
Reading Arbitrary Bytes from a File
Formatted Input
3.6 Output Commands
One-Dimensional Expression Output
Two-Dimensional Expression Output
Writing Maple Strings to a File
Writing Bytes to a File
Formatted Output
Writing Tabular Data
Flushing a Buﬀered File
Redirecting the default Output Stream
3.7 Conversion Commands
Conversion between Strings and Lists of Integers
Parsing Maple Expressions and Statements
Formatted Conversion to and from Strings
3.8 Notes to C Programmers
3.9 Conclusion
4 Numerical Programming in Maple
Floating-Point Calculations
Why Use Numerical Computations
4.1 The Basics of evalf
4.2 Hardware Floating-Point Numbers
Newton’s Method
Computing with Arrays of Numbers
4.3 Floating-Point Models in Maple
Software Floats
Roundoﬀ Error
4.4 Extending the evalf Command
Deﬁning New Constants
Deﬁning New Functions
4.5 Using the Matlab Package
4.6 Conclusion
5 Programming with Maple Graphics
Maple Plots
Creating Plotting Procedures
5.1 Basic Plotting Procedures
Altering a Plot
5.2 Programming with Plotting Library Procedures
Plotting a Loop
A Ribbon Plot Procedure
5.3 Maple Plot Data Structures
The PLOT Data Structure
Arguments Inside a PLOT Structure
A Sum Plot
The PLOT3D Data Structure
Objects Inside a PLOT3D Data Structure
5.4 Programming with Plot Data Structures
Writing Graphic Primitives
Plotting Gears
Polygon Meshes
5.5 Programming with the plottools Package
A Pie Chart
Creating a Tiling
A Smith Chart
Modifying Polygon Meshes
5.6 Vector Field Plots
Drawing a Vector
Generating a Vector Plot Field
5.7 Generating Grids of Points
5.8 Animation
Animation in Static Form
Graphical Object as Input
Methods for Creating Animations
Two and Three Dimensions
Demonstrating Physical Objects in Motion
5.9 Programming with Color
Generating Color Tables
Using Animation
Creating A Chess Board Plot
5.10 Conclusion
Code Generation
External Calling: Using Compiled Code in Maple
OpenMaple: Using Maple in Compiled Code
6.1 Code Generation
The CodeGeneration Package
Calling CodeGeneration Functions
Translation Process
Extending the CodeGeneration Translation Facilities
Deﬁning a Custom Translator
6.2 External Calling: Using Compiled Code in Maple
Method 1: Calling External Functions
External Deﬁnition
Type Speciﬁcation
Scalar Data Formats
Structured Data Formats
Specifying Argument Passing Conventions
Method 2: Generating Wrappers
Enumerated Types
Procedure Call Formats
Call by Reference
Array Options
Non-passed Arguments
Argument Checking and Eﬃciency Considerations
Conversions
Compiler Options
Evaluation Rules
Method 3: Customizing Wrappers
External Function Entry Point
Inspecting Automatically Generated Wrappers
External API
System Integrity
6.3 OpenMaple: Using Maple in Compiled Code
Interface Overview
Call-back Functions
Technical Issues
File Structure
Building the Sample Program
6.4 Conclusion
For/While Loop Statement
Foreign Data
Function Call
Garbage
Hardware Float
If Statement
Logical IMPLIES
Not Equal or Test for Inequality
Negative Integer
Positive Integer
Less Than or Equal
Less Than
Lexically Scoped Variable within an Expression
List
Local Variable within an Expression
Member
Module Deﬁnition
Module Instance
Identiﬁer
Next Statement
Logical NOT
Logical OR
Procedure Parameter within an Expression
Power
Procedure Deﬁnition
Product, Quotient, Power
Range
Rational
Return Statement
Rectangular Table
Save Statement
Series
Statement Sequence
Stop Maple
String
Sum, Diﬀerence
Table
Table Reference
Try Statement
Unevaluated Expression
Use Statement
Logical XOR
Polynomials with Integer Coeﬃcients modulo n
A.3 The Use of Hashing in Maple
Basic Hash Tables
Dynamic Hash Tables
The Simpliﬁcation Table
The Name Table
Remember Tables
Maple Language Arrays and Tables
Maple Language Rectangular Tables
A.4 Portability
Index
0 of .
Results for:
P. 1

Ratings: (0)|Views: 16 |Likes:

### Availability:

See more
See less

11/14/2011

pdf

text

original

Pages 10 to 40 are not shown in this preview.