Example usage for org.apache.mahout.common.iterator CountingIterator CountingIterator

List of usage examples for org.apache.mahout.common.iterator CountingIterator CountingIterator

Introduction

In this page you can find the example usage for org.apache.mahout.common.iterator CountingIterator CountingIterator.

Prototype

public CountingIterator(int to) 

Source Link

Usage

From source file:org.gpfvic.mahout.cf.taste.impl.model.BooleanItemPreferenceArray.java

License:Apache License

@Override
public Iterator<Preference> iterator() {
    return Iterators.transform(new CountingIterator(length()), new Function<Integer, Preference>() {
        @Override//from  w  w w  .  ja v a  2s .c o m
        public Preference apply(Integer from) {
            return new PreferenceView(from);
        }
    });
}