# ?gegas

Solves a system of interval linear equations by interval Gauss method.

## Syntax

call sigegas(trans, n, nrhs, a, lda, b, ldb, info)

call digegas(trans, n, nrhs, a, lda, b, ldb, info)

call crgegas(trans, n, nrhs, a, lda, b, ldb, info)

call zrgegas(trans, n, nrhs, a, lda, b, ldb, info)

call ccgegas(trans, n, nrhs, a, lda, b, ldb, info)

call zcgegas(trans, n, nrhs, a, lda, b, ldb, info)

## Description

The routine ?gegas uses the interval Gauss method to compute an enclosure of the solution set to the following interval linear system of equations:

`A*X = B`, if `trans = 'N'`

`AT*X = B`, if `trans = 'T'`

`AH*X = B`, if `trans =` 'C' (for complex matrices only).

## Input Parameters

trans

  CHARACTER(1). Must be one of 'N', 'T', 'C', 'n', 't', or 'c'.

  Indicates the form of the equations system:

  If `trans = 'N'` or 'n', then `A*X = B` is solved for X.

  If `trans = 'T'` or 't', then `AT*X = B` is solved for X.

  If `trans =` 'C' or 'c', then `AH*X = B` is solved for X.

n

  INTEGER. The order of A, the number of rows in B`(n ≥ 0)`.

nrhs

  INTEGER. The number of right-hand sides `(nrhs ≥ 0)`.

a, b

  REAL for sigegas.

  DOUBLE PRECISION for digegas.

  Arrays: `a (lda,*)`, `b (ldb,* )`.

  The array a contains the matrix A.

  The array b contains the matrix B, whose columns are the right-hand sides for the systems of equations.

  The second dimension of a must be at least `max(1,n)` and the second dimension of b must be at least `max(1,nrhs)`.

lda

  INTEGER. The first dimension of a, `lda ≥ max(1, n)`.

ldb

  INTEGER. The first dimension of b, `ldb ≥ max(1, n)`.

## Output Parameters

b

  Overwritten by the solution matrix X.

info

  INTEGER.

  If `info = 0`, the execution is successful.

  If ``info ≥ 0``, the execution is not successful.

  If `info = -i`, the i-th parameter has an illegal value.

## Fortran 90 Code for Interval Gauss Method

The following piece of Fortran code presents an example of using the routine digegas to compute, by an interval Gauss method, an enclosure of the solution set to the interval linear system of equations:

----------------------------------------------------------------------------------------------
`. . . . . .`
`USE INTERVAL_ARITHMETIC`
`. . . . . .`
`TYPE(D_INTERVAL) :: A(2,2), B(2)`
`INTEGER :: N, INFO`
`CHARACTER(1) :: TRANS = 'n'`
`. . . . . .`
`N = 2`
`A(1,1) = DINTERVAL(2.,3.); A(1,2) = DINTERVAL(0.,1.)`
`A(2,1) = DINTERVAL(1.,2.); A(2,2) = DINTERVAL(2.,3.)`
`B(1,1) = DINTERVAL(0.,120.); B(2,1) = DINTERVAL(60.,240.)`
`. . . . . .`
`CALL DIGEGAS( TRANS, N, 1, A, 2, B, 2, INFO )`

----------------------------------------------------------------------------------------------

Note that assigning double-precision intervals to the entries of the matrix A and right-hand side vector B is carried out by DINTERVAL function supplied by INTERVAL_ARITHMETIC module.

Parent topic: Routines for Fast Solution of Interval Systems