Developing statistical software in Fortran 95 /

Saved in:
Bibliographic Details
Author / Creator:Lemmon, David R.
Imprint:New York : Springer, 2005.
Description:xv, 323 p. : ill. ; 24 cm.
Language:English
Series:Statistics and computing
Subject:
Format: Print Book
URL for this record:http://pi.lib.uchicago.edu/1001/cat/bib/5668883
Hidden Bibliographic Details
Other authors / contributors:Schafer, J. L. (Joseph L.)
ISBN:0387238174 (alk. paper)
Notes:Includes bibliographical references (p. [315]-317) and index.
Table of Contents:
  • Preface
  • 1. Motivation
  • 1.1. Why We Wrote This Book
  • 1.2. For Whom We Are Writing
  • 1.2.1. Those Accustomed to Fortran 77
  • 1.2.2. Those Who Want to Create Windows Applications
  • 1.2.3. Those Who Want to Interface Fortran with Other Applications
  • 1.3. The Need for Good Programming Practice
  • 1.3.1. Programming for Research Dissemination
  • 1.3.2. Programming Standards
  • 1.3.3. Benefits of Good Programming Style
  • 1.3.4. Benefits of Uniformity
  • 1.4. Why We Use Fortran
  • 1.4.1. History of Fortran
  • 1.4.2. Fortran's Advantages
  • 1.4.3. Useful New Features
  • 1.4.4. What this book does not cover
  • 1.4.5. Differences Between Fortran 90 and Fortran 95
  • 1.4.6. Pseudo Object-Oriented Programming in Fortran
  • 1.4.7. Fortran 2003
  • 1.4.8. Which Compiler Should I Use?
  • 1.5. Developing Applications for a Broad Audience
  • 1.5.1. Console Applications and COM Servers
  • 1.5.2. COM Servers and Clients
  • 1.6. Scope of the Rest of This Book
  • 1.7. Our Source Code and Web Site
  • 2. Introduction to Modern Fortran
  • 2.1. Getting Started
  • 2.1.1. A Very Simple Program
  • 2.1.2. Fixed and Free-Form Source Code
  • 2.1.3. Compiling, Linking and Running
  • 2.1.4. Compiler Options
  • 2.1.5. Standard Input and Output
  • 2.1.6. Intrinsic Uniform Generator
  • 2.1.7. Integer and Real Kinds
  • 2.1.8. Do, if, case, goto
  • 2.1.9. Exercises
  • 2.2. Arrays
  • 2.2.1. Rank, Size and Shape
  • 2.2.2. Array Functions
  • 2.2.3. Operations on Arrays and Array Sections
  • 2.2.4. Your Mileage May Vary
  • 2.2.5. Array Allocation
  • 2.2.6. Exercises
  • 2.3. Basic Procedures
  • 2.3.1. Subroutines
  • 2.3.2. Assumed-Shape and Optional Arguments
  • 2.3.3. Functions
  • 2.3.4. Pure, Elemental and Recursive Procedures
  • 2.3.5. On the Behavior of Local Variables
  • 2.3.6. Exercises
  • 2.4. Manipulating Character Strings
  • 2.4.1. Character Variables
  • 2.4.2. Assigning, Comparing, and Concatenating Strings
  • 2.4.3. More String Functions
  • 2.4.4. Internal Files
  • 2.4.5. Exercises
  • 2.5. Additional Topics
  • 2.5.1. Expressions with Mixed Types and Kinds
  • 2.5.2. Explicit Type Conversion
  • 2.5.3. Generic Procedures
  • 2.5.4. Don't Pause or Stop
  • 2.6. Additional Exercises
  • 3. A Pseudo Object-Oriented Style
  • 3.1. Basic Concepts of Object-Oriented Programming
  • 3.1.1. Objects and Classes
  • 3.1.2. Properties
  • 3.1.3. Put and Get
  • 3.1.4. Methods and Constructors
  • 3.1.5. Conceptualizing an Interface
  • 3.1.6. Other Object-Oriented Concepts
  • 3.1.7. Exercises
  • 3.2. Modules
  • 3.2.1. What Is a Module?
  • 3.2.2. How Not to Use Modules
  • 3.2.3. How to Use Modules
  • 3.2.4. Generic Module Procedures
  • 3.2.5. Exercises
  • 3.3. Derived Types
  • 3.3.1. What Is a Derived Type?
  • 3.3.2. Using Derived Types
  • 3.3.3. Constructors and Default Initialization
  • 3.3.4. Exercises
  • 3.4. Pointers
  • 3.4.1. Fear Not the Pointer
  • 3.4.2. Pointer Assignment
  • 3.4.3. Pointer Status
  • 3.4.4. Pointer Allocation
  • 3.4.5. Pointer Deallocation
  • 3.4.6. Memory Leaks
  • 3.4.7. Exercises
  • 3.5. Why We Need Pointers
  • 3.5.1. Pointers in Derived Types
  • 3.5.2. Pointers as Dummy Arguments
  • 3.5.3. Recursive Data Structures
  • 3.5.4. Procedures for Linked Lists
  • 3.5.5. Exercises
  • 3.6. Example Module: A Generic Error Handler
  • 3.6.1. Strategy for Managing Run-Time Errors
  • 3.6.2. Structure of the Module
  • 3.6.3. Module Procedures
  • 3.6.4. Using the Module
  • 3.6.5. General Guidelines for Modules
  • 3.7. Additional Exercises
  • 4. Implementing Computational Routines
  • 4.1. Issues of Numerical Accuracy
  • 4.1.1. Accuracy Is Crucial
  • 4.1.2. Floating-Point Approximation
  • 4.1.3. Roundoff and Cancellation Error
  • 4.1.4. Arithmetic Exceptions
  • 4.1.5. Resources for Numerical Programming
  • 4.1.6. Exercises
  • 4.2. Example: Fitting a Simple Finite Mixture
  • 4.2.1. The Problem
  • 4.2.2. Programming Constants
  • 4.2.3. A Computational Engine Module
  • 4.2.4. A Public Procedure With Safeguards
  • 4.2.5. The Computations
  • 4.2.6. Strategies for Calling the Engine
  • 4.2.7. A Simple Calling Program
  • 4.2.8. Test, and Test Again
  • 4.2.9. Exercises
  • 4.3. Efficient Routines at Lower Levels
  • 4.3.1. What Is a Lower-Level Procedure?
  • 4.3.2. Keeping Overhead Low
  • 4.3.3. Taking Advantage of Structure
  • 4.3.4. Loop Reordering, Stride and Saxpy
  • 4.3.5. Optimization, Pipelining and Multiple Processors
  • 4.3.6. A Simple Example
  • 4.3.7. Hidden Allocation of Temporary Arrays
  • 4.3.8. Exercises
  • 4.4. More Computational Procedure Examples
  • 4.4.1. An Improved Cholesky Factorization
  • 4.4.2. Inverting a Symmetric Positive-Definite Matrix
  • 4.4.3. Weighted Least Squares
  • 4.4.4. Computational Routines in Object-Oriented Programming
  • 4.5. Additional Exercises
  • 5. Developing a Console Application
  • 5.1. A Program for Logistic Regression
  • 5.1.1. The logistic regression model
  • 5.1.2. Motivation for the ELOGIT Console Program
  • 5.1.3. Dependency Map for Source Components
  • 5.1.4. Developing Program Units Incrementally
  • 5.2. Where to Begin
  • 5.2.1. Before You Start
  • 5.2.2. Program Constants
  • 5.2.3. The Control File Interface
  • 5.2.4. First Snapshot of ELOGIT
  • 5.2.5. Exercises
  • 5.3. Starting the Main Types Module
  • 5.3.1. An Object-Oriented Design
  • 5.3.2. Storing the Dataset
  • 5.3.3. A Module for Pointer Allocation
  • 5.3.4. Putting and Getting Data
  • 5.3.5. Reading Data from Files
  • 5.3.6. Second Snapshot of ELOGIT
  • 5.3.7. Exercises
  • 5.4. Specifying the Model
  • 5.4.1. Storing the Model Specification
  • 5.4.2. Putting and Getting Model Properties
  • 5.4.3. Third Snapshot
  • 5.4.4. Exercises
  • 5.5. Fitting the Model
  • 5.5.1. The Computational Task
  • 5.5.2. Newton-Raphson and Weighted Least Squares
  • 5.5.3. Parameters and Results
  • 5.5.4. The Model-Fitting Procedure
  • 5.5.5. Reporting the Results
  • 5.5.6. Looking Ahead
  • 5.6. Additional Exercises
  • 6. Creating and Using Dynamic-Link Libraries
  • 6.1. Extending the Functionality of Statistical Packages with Fortran DLLs
  • 6.1.1. Compiled Procedures Run Faster
  • 6.1.2. When to Use a DLL
  • 6.2. Understanding Libraries
  • 6.2.1. Source-Code Libraries
  • 6.2.2. Static Libraries
  • 6.2.3. Dynamic-Link Libraries
  • 6.3. How Programs Use DLLs
  • 6.3.1. Locating the DLL
  • 6.3.2. DLL Hell
  • 6.3.3. Dynamic Loading and Linking
  • 6.3.4. Load-Time and Run-Time Linking
  • 6.4. Creating a Fortran DLL
  • 6.4.1. The Basic Steps
  • 6.4.2. Passing Arguments
  • 6.4.3. Calling Conventions
  • 6.4.4. Compiling and Linking the Source Code
  • 6.4.5. Compiler Options
  • 6.5. Example: a Fortran DLL for Fitting an Exponential Mixture
  • 6.5.1. Creating a Wrapper
  • 6.5.2. Building the DLL with Intel Visual Fortran and Lahey/Fujitsu Fortran
  • 6.5.3. Building with Salford Fortran
  • 6.5.4. Calling the DLL Procedure from S-PLUS and R
  • 6.5.5. Calling the Function from SAS/IML
  • 6.6. Shared Objects in Unix and Linux
  • 6.6.1. An Example: Extending S-Plus and R via a Fortran Shared Object in Linux
  • 7. Creating COM Servers
  • 7.1. A Simple Example
  • 7.1.1. The magic8 Fortran Module
  • 7.1.2. The Magic8 COM Server
  • 7.1.3. Installing the Magic8 COM Server
  • 7.1.4. The 8-Ball Speaks in Excel
  • 7.1.5. The 8-Ball Speaks in S-PLUS and R
  • 7.1.6. The 8-Ball Speaks in MATLAB
  • 7.1.7. The 8-Ball Speaks in SAS
  • 7.1.8. Exercises
  • 7.2. COM Server Basics
  • 7.2.1. References on COM
  • 7.2.2. COM, Windows, and .NET
  • 7.2.3. COM Servers versus Conventional DLLs
  • 7.2.4. The Object-Oriented Contract
  • 7.2.5. In-Process versus Out-of-Process Servers
  • 7.3. Example: A COM Server for Logistic Regression
  • 7.3.1. Producing COM Servers with Intel Visual Fortran
  • 7.3.2. Getting Ready
  • 7.3.3. Naming the Server and the Class
  • 7.3.4. Fortran Style Conventions
  • 7.3.5. Automatically Generating the COM Server Code
  • 7.3.6. Building the Project in Visual Studio
  • 7.3.7. Building and registering the server
  • 7.3.8. Creating a Simple Client
  • 7.4. Exercises
  • 7.5. How the Fortran COM Server Works
  • 7.5.1. Overview of the Automatically Generated Code
  • 7.5.2. The Interface Definition Language File
  • 7.5.3. The Instance Code
  • 7.5.4. The Interface Code
  • 7.5.5. Passing Arrays as Variants
  • 7.5.6. How the COM Server Handles Errors
  • 7.6. Distributing and Installing COM Servers
  • 7.7. Additional Exercises
  • 8. Creating COM Clients
  • 8.1. An Improved Client for Excel
  • 8.1.1. Excel As a Graphical User Interface
  • 8.1.2. Starting to Write the Client
  • 8.1.3. How Did It Work?
  • 8.1.4. Debugging the Client and Server
  • 8.1.5. Finishing the Excel Client
  • 8.1.6. Exercises
  • 8.2. Clients for Other Environments
  • 8.2.1. Keeping It Simple
  • 8.2.2. Clients for S-PLUS and R
  • 8.2.3. A Client for SAS
  • 8.2.4. SPSS
  • 8.2.5. MATLAB
  • 8.3. Creating a Standalone GUI Application
  • 8.3.1. Component-Based Design
  • 8.3.2. Visual Basic .NET
  • 8.3.3. An XML Data Format
  • 8.3.4. Starting the Graphical Interface
  • 8.3.5. Reading the Data File
  • 8.3.6. Specifying the Model
  • 8.3.7. Invoking the Model Fit Procedure
  • 8.3.8. Displaying the Results
  • 8.3.9. Finishing Up
  • 8.3.10. Exercises
  • References