Next: 3B procedures Up: Miscellaneous procedures Previous: Void procedures   Contents

# Bisection procedures

We indicate here the program used for the bisection in the general solving procedures with the abbreviation SG Solve_General_Interval, SGG for Solve_General_Gradient_Interval and SJH for Solve_General_JH_Interval. All procedures return the number of the variable that will be bisected (a return code of 0 or lower is an error message). .

SG, mode 1, 3, 4, SGG, SJH, mode 1:

```
int Select_Best_Direction_Interval_Fast(int Dim,INTERVAL_VECTOR &Input)
```
where Dim is the number of unknowns and Input is the box

SG, mode 2, SGG, mode 6:

```
int Select_Best_Direction_Interval(int Dim,int Dimension_Eq,int Order,
INTERVAL_VECTOR (*Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```
where Dimension_Eq is the number of equations and Order the current ordering mode of the boxes.

SGG, SJH, mode 2:

```
int Select_Best_Direction_Smear(int Dim,int Dimension_Eq,
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_MATRIX (* Gradient)(int, int, INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```
where Func is the name of the procedure that interval evaluates the equations and Gradient the procedure that evaluates the derivative of the equations.

SGG, SJH, mode 3:

```
int Select_Best_Direction_Smear_Bounded(int Dim,int Dimension_Eq,
double Bound,
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_MATRIX (* Gradient)(int, int, INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```
where Bound represents ALIAS_Bound_Smear.

SGG, SJH, mode 4:

```
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_MATRIX (* Gradient)(int, int, INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input, double *SINDEX)
```
where SINDEX is the criteria value.

SG, SGG, SJH, mode 5:

```
int Select_Best_Direction_Interval_Round_Robin(int Dim,INTERVAL_VECTOR &Input)
```

SG, mode 6:

```
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```

SJH, mode 6:

```
int Select_Best_Direction_Weight(int DimVar,INTERVAL_VECTOR &Input)
```

SGG, mode 7:

```
int Select_Best_Direction_Interval_Proc(int Dim,int Dimension_Eq,
int Nb_Var,int Order,
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input,int (* Simp_Proc)(INTERVAL_VECTOR &))
```
where Nb_Var is set to 1.

We have a specific bisection procedure for the distance equations that corresponds to mode 1 of SG:

```
int Select_Best_Direction_Distance(int Dimension,int Dimension_Eq,
INTEGER_MATRIX &APOW,
MATRIX &ACONS,VECTOR &LI,
int NB_EQV,int NB_VARV,MATRIX &AVARV,
INTERVAL_VECTOR &Input,double *SPLIT)
```
where SPLIT is the bisection point.

A specific version of the smear procedure is used for determining the condition number of a matrix (mode 2):

```
int Select_Best_Direction_Smear_CN(int Dim,int Dimension_Eq,
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_MATRIX (* Gradient)(int, int, INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```

Similarly there is a special mode 2 for the procedures dealing the with the eigenvalues of a matrix:

```
int Select_Best_Direction_Smear_Eigen(int Dim,int Dimension_Eq,
INTERVAL_VECTOR (* Func)(int,int,INTERVAL_VECTOR &),
INTERVAL_MATRIX (* Gradient)(int, int, INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```
You may define your own bisection procedure by setting the variable Single_Bisection to 20 while having defined the procedure:
```
int Select_Best_Direction_Interval_User(int DimVar,int DimEq,
INTERVAL_VECTOR (* TheIntervalFunction)(int,int,INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
```
where DimVar is the size of the unknown vector, DimEq the number of equations, TheIntervalFunction the evaluation function of your problem and Input the current box. This procedure shall return the variable number that will be bisected.

If you are not using this possibility you still need to define this procedure as:

```
int Select_Best_Direction_Interval_User(int DimVar,int DimEq,
INTERVAL_VECTOR (* TheIntervalFunction)(int,int,INTERVAL_VECTOR &),
INTERVAL_VECTOR &Input)
{
return 0;
}
```

Next: 3B procedures Up: Miscellaneous procedures Previous: Void procedures   Contents
Jean-Pierre Merlet 2012-12-20