{
switch (_fun.getFunction()) {
case CHITEST: {
if (_fun.cardinality() < 6) {
final ArrayDescriptor descX = ((ExpressionNodeForArrayReference) _fun.argument( 0 )).arrayDescriptor();
final int colsX = descX.numberOfColumns();
final int rowsX = descX.numberOfRows();
final ArrayDescriptor descY = ((ExpressionNodeForArrayReference) _fun.argument( 1 )).arrayDescriptor();
final int colsY = descY.numberOfColumns();
final int rowsY = descY.numberOfRows();
return fun( CHITEST, _fun.argument( 0 ), _fun.argument( 1 ), cst( colsX, DataType.NUMERIC ), cst( rowsX,
DataType.NUMERIC ), cst( colsY, DataType.NUMERIC ), cst( rowsY, DataType.NUMERIC ) );
}
break;
}
case MDETERM: {
if (_fun.cardinality() < 2) {
final ArrayDescriptor desc = ((ExpressionNodeForArrayReference) _fun.argument( 0 )).arrayDescriptor();
final int cols = desc.numberOfColumns();
final int rows = desc.numberOfRows();
if (cols != rows) {
throw new CompilerException.UnsupportedExpression( "MDETERM called with non-square matrix" );
}
return fun( MDETERM, _fun.argument( 0 ), cst( cols, DataType.NUMERIC ) );
}