max2d: Find the maxima of a 2D matrix.

Description Usage Arguments Details Value Author(s) Examples

View source: R/max2d.R

Description

Function for 2D matrices returning extremal values and its corresponding indices.

Usage

1
max2d = function(mat,epsilon,maximum=TRUE,maxRows=NA)

Arguments

epsilon

Relative tolerance level in [0,1], controlling the amount of extremal values desired. Zero: consider only maximum values (possibly degenerated) One: consider every value

mat

Matrix at hand.

maximum

Boolean value indicating, wether to search for a minimum or a maximum.

maxRows

Upper bound for number of results.

Details

If maxRows is provided, the returning data frame is sorted by MaxVal.

Value

Data frame with three columns:

MaxVal

Extremal value.

RowIndex

Corresponding x index of the extremum within the matrix.

ColIndex

Corresponding y index of the extremum within the matrix.

Author(s)

Philipp van Wickevoort Crommelin

Examples

1
2
3
4
5
6
7
8
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x)
{
  }

PhilippVWC/myBayes documentation built on Oct. 2, 2020, 8:25 a.m.