A Computational Environment for Interval Matrices in C

  • Slides: 20
Download presentation
A Computational Environment for Interval Matrices in C++ Michael Nooner and Chenyi Hu Computer

A Computational Environment for Interval Matrices in C++ Michael Nooner and Chenyi Hu Computer Science Department, University of Central Arkansas

Introduction 1. 2. 3. 4. Motivations What is Int. BLAS Why use Int. BLAS

Introduction 1. 2. 3. 4. Motivations What is Int. BLAS Why use Int. BLAS The package

Motivations • Profil, Int. LAB, Int. Lib • Easy to use • Cross platform

Motivations • Profil, Int. LAB, Int. Lib • Easy to use • Cross platform

What Is Int. BLAS • Interval BLAS Standard • Basic Interval Arithmetic Subroutines (Int.

What Is Int. BLAS • Interval BLAS Standard • Basic Interval Arithmetic Subroutines (Int. Lib) • Interval Basic Linear Algebra Subroutines • Level 1, 2, 3 • C++ Implementation • Three core objects • Three auxiliary objects

Why use Int. BLAS • Easy to install • GCC • Visual Studio •

Why use Int. BLAS • Easy to install • GCC • Visual Studio • More on the way … • • Cross Platform Open Source (LGPL) Well Documented Easy to use

The Package • One header • Int. BLAS. h • Two Static Libraries •

The Package • One header • Int. BLAS. h • Two Static Libraries • intblas. lib (optimized) • intblas_d. lib (debug) • One Namespace • intblas • One Initialization Function • INIT_INTERVAL()

The Package #include <Int. BLAS. h> using namespace intblas; int main() { INIT_INTERVAL(); Interval

The Package #include <Int. BLAS. h> using namespace intblas; int main() { INIT_INTERVAL(); Interval a(. 1 ); Interval. Matrix m( 2, 2 ), result; m[0][0] = 2. 3; m[0][1] = 3. 3; m[1][0] = 5. 5; m[1][1] = a; result = m + a;

Core Classes

Core Classes

Core Classes • Three Main Classes • Interval. Vector • Interval. Matrix

Core Classes • Three Main Classes • Interval. Vector • Interval. Matrix

Interval Class • Int. Lib • Double precision • Rounding • Round Up: add

Interval Class • Int. Lib • Double precision • Rounding • Round Up: add one ε • Round Down: subtract one ε • 16 th – 18 th significant digit

Interval Class • Arithmetic operators • Standard Functions • ipow, isin, isqrt, ilog, iatan

Interval Class • Arithmetic operators • Standard Functions • ipow, isin, isqrt, ilog, iatan … • Additional interval set routines • is. Empty(), midpoint(), width(), …

Interval. Vector and Interval. Matrix • BLAS Standard • Method/Function pairs double norm( NORMTYPE

Interval. Vector and Interval. Matrix • BLAS Standard • Method/Function pairs double norm( NORMTYPE n ); friend double norm( Interval. Matrix& a, NORMTYPE n ); • Arithmetic operators • Assignment operator • Intermediate values

Auxiliary Classes

Auxiliary Classes

Error Handling • INTERVAL_EXCEPTION int code char msg[200] • Global Error Object • 32

Error Handling • INTERVAL_EXCEPTION int code char msg[200] • Global Error Object • 32 predefined codes set. Error( int code, const char* msg = NULL ) get. Last. Error()

Interval. Vector. T & Interval. Matrix. T • Enables strong dimension checking • Typdef

Interval. Vector. T & Interval. Matrix. T • Enables strong dimension checking • Typdef common matrices and vectors typedef Interval. Matrix. T<2, 2> IMatrix 2 x 2; . . . IMatrix 2 x 2 m, n, o;

Demo

Demo

Problem • Solve the following set of linear equations:

Problem • Solve the following set of linear equations:

Problem • By paper the solution is

Problem • By paper the solution is

Conclusion • • Interval Basic Linear Algebra Subprograms Easy to install Cross Platform Open

Conclusion • • Interval Basic Linear Algebra Subprograms Easy to install Cross Platform Open Source Well Documented Easy to use Download it from http: //www. geocities. com/mike_nooner

Future Work • • • Banded and Sparse Matrices Arbitrary precision arithmetic Fuzzy Logic

Future Work • • • Banded and Sparse Matrices Arbitrary precision arithmetic Fuzzy Logic Module Interval Based LU Decomposition Other cool stuff!