[go: up one dir, main page]

idamax

Function idamax 

Source
pub unsafe fn idamax(n: usize, x: *const f64) -> usize
Expand description

Finds the index of the element with the largest absolute value in a vector.

§Arguments

  • n - The number of elements in the vector x.
  • x - A raw constant pointer to the first element of the vector.

§Returns

A usize representing the 0-based index of the first element with the maximum absolute value. If n is 0, this function will return 0.