class DoubleVertexSamples extends Samples<DoubleTensor> {

    public DoubleTensor getVariances() {
        DoubleTensor sumOfSquares = this.samples.stream()
            .reduce(DoubleTensor.zeros(sampleShape), (l, r) -> l.plusInPlace(r.pow(2)));
        return sumOfSquares
            .divInPlace((double) samples.size())
            .minusInPlace(getAverages().pow(2))
            .timesInPlace((double) samples.size())
            .divInPlace(samples.size() - 1.);
    }

    public  DoubleVertexSamples(List<DoubleTensor> samples);

}