Mercurial > octave-nkf
diff libcruft/arpack/util/icnteq.f @ 12274:9f5d2ef078e8 release-3-4-x
import ARPACK sources to libcruft from Debian package libarpack2 2.1+parpack96.dfsg-3+b1
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 28 Jan 2011 14:04:33 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libcruft/arpack/util/icnteq.f Fri Jan 28 14:04:33 2011 -0500 @@ -0,0 +1,18 @@ +c +c----------------------------------------------------------------------- +c +c Count the number of elements equal to a specified integer value. +c + integer function icnteq (n, array, value) +c + integer n, value + integer array(*) +c + k = 0 + do 10 i = 1, n + if (array(i) .eq. value) k = k + 1 + 10 continue + icnteq = k +c + return + end