public static SampleSet generateSamples(final int length) {
        SampleSet set = new SampleSet();
        //
        int size = 1 << length;
        boolean[] data = new boolean[length];
        //
        for (int i = 0; i < size; i++) {
            Sample s = new Sample(1, length, 1, 1);
            //
            for (int j = 0; j < data.length; j++) {
                s.getInput()[j] = (data[j]?(1.0):(0.0));
            }
            //
            s.getTarget()[0] = (xor(data)?(1.0):(0.0));
            incrBit(data, 0);
            set.add(s);
        }
        //
        return set;
    }