Check the Dimensions of the Cost Function Output

Share:

Description

This function is called by optimbase.checkcostfun to check whether the dimensions of a cost function output match the expectations.

Usage

1
2
  optimbase.checkshape(this = NULL, varname = NULL, data = NULL, index = NULL,
                       expectednrows = NULL, expectedncols = NULL)

Arguments

this

An optimization object.

varname

The name of the output being checked, either 'f', 'c', or 'g'.

data

A content of the output.

index

The index (see vignette('optimbase',package='optimbase') for more details).

expectednrows

Number of expected rows.

expectedncols

Number of expected columns.

Value

Return the optimization object or an error message if the dimensions are inconsistent.

Author(s)

Author of Scilab optimbase module: Michael Baudin (INRIA - Digiteo)

Author of R adaptation: Sebastien Bihorel (sb.pmlab@gmail.com)

See Also

optimbase.checkcostfun