Class NLtest

Inheritance Relationships

Base Type

  • public handle

Class Documentation

class NLtest : public handle

Public Functions

function NLtest()

Create a new class instance for the NLtest object. A class storing \( \mathbf{f}(\mathbf{x}) \) and its jacobian, guess, and exact solution (if available) for many nonlinear systems.

Usage:

ref = NLtest()

Output

  • ref the instance of the Matlab class.

function listall( self)

Print on console the list of available test cases.

Usage:

ref.listall();
function numberOfTests( self)

Return the number of available test cases.

Usage:

ntest = ref.numTest();
function select( self, name_or_number)

Select the active test to be used.

Usage:

ntest = 23;
ref.select( ntest );

test_name = 'Beale';
ref.select( test_name );
function evalF( self, varargin)

Evaluate \( \mathbf{f}(\mathbf{x}) \) or \( f_k(\mathbf{x}) \) for the active test.

Usage:

f = ref.evalF( x );

k = 2;
f2 = ref.select( x, k ); % Only k-th component
function evalJF( self, x)

Return a sparse matrix containing

\[ \dfrac{\partial\mathbf{f}(\mathbf{x})}{\partial\mathbf{x}} \]

for the active test.

Usage:

J = ref.evalJF( x );
function pattern( self)

Return a sparse matrix containing the pattern of nonzeros of the jacobian

\[ \dfrac{\partial\mathbf{f}(\mathbf{x})}{\partial\mathbf{x}} \]

for the active test.

Usage:

Jpattern = ref.pattern( x );
function neq( self)

Return number of equations of the active nonlinear system.

Usage:

N = ref.neq();
function numGuess( self)

Return number of initial guess points of the active nonlinear system.

Usage:

NG = ref.numGuess();
function guess( self, n)

Return the n-th guess point of the active nonlinear system.

Usage:

g = ref.guess( n );
function numExact( self)

Return number of available exact solution of the active nonlinear system. May be 0.

Usage:

NG = ref.numExact();
function exact( self, n)

Return the n-th exact solution of the active nonlinear system.

Usage:

e = ref.exact( n );
function check( self, x)

Check if x satisfy the active nonlinear system.

Usage:

ok = ref.check( x );
function bbox( self)

Return lower and upper bound for the solutions of the active nonlinear system.

Usage:

[L,U] = ref.bbox( x );
function numActive( self)

Return the number of the active nonlinear system.

Usage:

n = ref.numActive( x );
function name( self, varargin)

Return the name (string) of the n-th or the active nonlinear system.

Usage:

testname = ref.name( 10 ); % the name of the test n. 10

testname = ref.name(); % the name of the active test
function bibtex( self, varargin)

Return the bibtex string of the n-th or the active nonlinear system.

Usage:

bib = ref.bibtex( 10 ); % the bibtex of the test n. 10

bib = ref.bibtex(); % the bibtex of the active test