trouve_premier

Recherche de l'indice du premier élément vrai dans un tableau de bouléens.

Espace de nom : tsd

Prototype

entier trouve_premier(const Vecb &x)

Description

Exemple

soit x   = linspace(-2, 2, 5); // -2, -1, 0, 1, 2
soit idx = trouve_premier(x >= 0); // idx = 2

Voir aussi

trouve(), trouve_dernier()