Yorick
Table of Contents
- 1 Basic Ideas
- 1.1 Simple Statements
- 1.2 Flow Control Statements
- 1.3 The Interpreted Environment
- 2 Using Array Syntax
- 2.1 Creating Arrays
- 2.2 Interpolating
- 2.3 Indexing
- 2.3.1 Scalar indices and array order
- 2.3.2 Selecting a range of indices
- 2.3.3 Nil index refers to an entire dimension
- 2.3.4 Selecting an arbitrary list of indices
- 2.3.5 Creating a pseudo-index
- 2.3.6 Numbering a dimension from its last element
- 2.3.7 Using a rubber index
- 2.3.8 Marking an index for matrix multiplication
- 2.3.9 Rank reducing (statistical) range functions
- 2.3.10 Rank preserving (finite difference) range functions
- 2.4 Sorting
- 2.5 Transposing
- 2.6 Broadcasting and conformability
- 2.7 Dimension Lists
- 3 Graphics
- 4 Embedding Compiled Routines Inside Yorick
Yorick: An Interpreted Language
| • Basics: | A tutorial-like introductory chapter. | |
| • Arrays: | Using array syntax. | |
| • Graphics: | How to plot things. | |
| • Embedding: | Embedding compiled code in a custom Yorick. | |
— The Detailed Node Listing — Basic Ideas | ||
|---|---|---|
| • Simple Statements: | ||
| • Flow control: | Defining functions, conditionals, and loops. | |
| • Environment: | How to use Yorick’s interpreted environment. | |
Simple Statements | ||
| • Define variable: | ||
| • Call procedure: | ||
| • Print expression: | ||
Flow Control Statements | ||
| • Define function: | ||
| • Define procedure: | ||
| • Conditionals: | Conditionally executing statements. | |
| • Loops: | Repeatedly executing statements. | |
| • Scoping: | Local and external variables. | |
Conditional Execution | ||
| • if-else constructs: | ||
| • logical operators: | ||
Loops | ||
| • while and do: | ||
| • for: | ||
| • goto: | How to break, continue, and goto from a loop body. | |
Variable scope | ||
| • extern: | ||
| • local: | ||
The Interpreted Environment | ||
| • Starting: | Starting, stopping, and interrupting Yorick. | |
| • Include: | How to read Yorick statements from a file. | |
| • Help: | Using the help command. | |
| • Info: | Getting information about a variable. | |
| • Prompts: | What Yorick prompts mean. | |
| • Shell commands: | Issuing shell commands from within Yorick. | |
| • Errors: | What to do when Yorick detects an error. | |
Include files | ||
| • Sample include: | ||
| • Comments: | ||
| • DOCUMENT: | The help command recognizes special comments. | |
| • Include path: | Directories Yorick searches for include files. | |
| • Customizing: | How to execute Yorick statements at startup. | |
Error Messages | ||
| • Runtime errors: | ||
| • Simple debugging: | ||
Using Array Syntax | ||
| • Creating Arrays: | How to originate arrays. | |
| • Interpolating: | Interpolation functions. | |
| • Indexing: | How to reference array elements. | |
| • Sorting: | How to sort an array. | |
| • Transposing: | How to change the order of array dimensions. | |
| • Broadcasting: | Making arrays conformable. | |
| • Dimension Lists: | ||
Indexing | ||
| • Scalar Index: | Scalar indices and array order. | |
| • Index Range: | Selecting a range of indices. | |
| • Nil Index: | Nil index refers to an entire dimension. | |
| • Index List: | Selecting an arbitrary list of indices. | |
| • Pseudo-Index: | Creating a pseudo-index. | |
| • Negative Index: | Numbering a dimension from its last element. | |
| • Rubber-Index: | Using a rubber index. | |
| • Matrix Multiply: | Marking an index for matrix multiplication. | |
| • Statistical: | Rank reducing (statistical) range functions. | |
| • Finite Difference: | Rank preserving (finite difference) range functions. | |
Graphics | ||
| • Plotting primitives: | The basic drawing functions. | |
| • Plot limits: | Setting plot limits, log scaling, etc. | |
| • Display list: | The display list model. | |
| • Hardcopy: | How to get it. | |
| • Graphics style: | How to change it. | |
| • Query and edit: | Seeing legends and making minor changes. | |
| • pldefault: | Setting (non-default) defaults. | |
| • Custom plot functions: | Combining the plotting primitives. | |
| • Animation: | Spielberg look out. | |
| • 3D graphics: | An experimental interface. | |
Primitive plotting functions | ||
| • plg: | Plot graph. | |
| • pldj: | Plot disjoint lines. | |
| • plm: | Plot quadrilateral mesh. | |
| • plc: | Plot contours. | |
| • plf: | Plot filled quadrilateral mesh. | |
| • pli: | Plot image. | |
| • plfp: | Plot filled polygons. | |
| • plv: | Plot vectors. | |
| • plt: | Plot text. | |
Plot limits and relatives | ||
| • limits: | Set plot limits. | |
| • logxy: | Set log axis scaling. | |
| • gridxy: | Set grid lines. | |
| • palette: | Set color palette. | |
| • Color model: | More about color. | |
limits | ||
| • mouse zooming: | How to zoom by mouse clicks. | |
| • saving limits: | Save and restore plot limits. | |
| • square limits: | Assure that circles are not ellipses. | |
Managing a display list | ||
| • fma: | Frame advance (begin next picture). | |
| • multiple windows: | How to get them. | |
Getting hardcopy | ||
| • Color hardcopy: | Dumping palettes into hardcopy files. | |
| • CGM hardcopy: | Caveats about binary CGM format. | |
| • EPS hardcopy: | Encapsulated PostScript output. | |
Graphics style | ||
| • style keyword: | Accessing predefined graphics styles. | |
| • style.i: | Bypassing predefined graphics styles. | |
| • plsys: | Multiple coordinate systems. | |
| • ticks and labels: | How to change them. | |
Queries, edits, and legends | ||
| • legends: | Setting plot legends. | |
| • plq and pledit: | The plot query and edit functions. | |
3D graphics interfaces | ||
| • 3D mapping: | Changing your viewpoint. | |
| • 3D lighting: | The 3D lighting model. | |
| • 3D gnomon: | Gnomon indicates axis orientation. | |
| • plwf: | The plot wire frame interface. | |
| • slice3: | The slice and isosurface interface. | |
Embedding | ||
| • Mechanics of embedding: | How to use the make utility. | |
| • API for embedding: | Using the yapi.h interface. | |
| • Embedding example: | Three ways to implement a function. | |
Embedding example | ||
| • Using PROTOTYPE: | Example of PROTOTYPE comment. | |
| • Using yapi.h: | Example of yapi.h API. | |