math.extras: simpler herfindahl.

db4
John Benediktsson 2012-09-26 15:43:15 -07:00
parent ddbffb6375
commit 9d813ef1a9
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ PRIVATE>
] if ;
: herfindahl ( seq -- x )
dup sum sq '[ sq _ / ] map-sum ;
[ sum-of-squares ] [ sum sq ] bi / ;
: normalized-herfindahl ( seq -- x )
[ herfindahl ] [ length recip ] bi