I had to write my own iterator implementation for my structure which has ArrayList&lt;Vector&gt; field. An iterator is supposed to iterate over mentioned List. Any suggestions on improving it, or anything else?

public class ExamplesIterator implements Iterator&lt;Vector&gt; {

    private List&lt;Vector&gt; examples;  //ArrayList&lt;Vector&gt; will be set here
    private int          index;

    public ExamplesIterator(List&lt;Vector&gt; examples) {
        this.examples = examples;
        index = 0;
    }

    @Override
    public Vector next() {
        if(hasNext()) {
            return examples.get(index++);
        } else {
            throw new NoSuchElementException("There are no elements size = " + examples.size());
        }
    }

    @Override
    public boolean hasNext() {
        return !(examples.size() == index);
    }

    @Override
    public void remove() {
        if(index &lt;= 0) {
            throw new IllegalStateException("You can't delete element before first next() method call");
        }
        examples.remove(--index);
    }
}



Question: relation between eigenvectors of $A$ and $A^TA$?
Answer: There is no simple relation between eigenvectors of $A$ and of $A^*A$ unless $A$ is normal. For example, if 
$$
A=\pmatrix{0&amp;1\\0&amp;0},
$$
$A$ has only one dimensional eigenvector subspace spanned by $[1,0]^T$, but $A^*A=0$ so any nonzero 2-vector is its eigenvector. Even if $A$ is diagonalizable, the eigenspaces of $A$ and $A^*A$ can be completely different.

If $A$ is normal, then $A=UDU^*$ for a unitary $U$ and diagonal $D$, so $A^*A=U|D|^2U^*$ is the spectral decomposition of $A^*A$. 

However, there is a simple relation between left singular vectors of $A$ and the eigenvectors of $A^*A$ as indicated in another answer.