Ejemplo n.º 1
0
        public override void Load(BinaryReader reader)
        {
            BinIO.magic_read(reader, "dataset");
            int t;

            BinIO.scalar_read(reader, out t);
            CHECK_ARG(t == DatatypeSize, "t == sizeof(sbyte)");
            BinIO.narray_read(reader, data);
            BinIO.narray_read(reader, classes);
            BinIO.scalar_read(reader, out nc);
            BinIO.scalar_read(reader, out nf);
            CHECK_ARG(nf > 0 && nf < 1000000, "nf > 0 && nf < 1000000");
            CHECK_ARG(nc > 0 && nc < 1000000, "nc > 0 && nc < 1000000");
        }
Ejemplo n.º 2
0
        public override void Load(BinaryReader reader)
        {
            BinIO.magic_read(reader, "dataset");
            int t, nsamples;

            BinIO.scalar_read(reader, out t);
            CHECK_ARG(t == DatatypeSize, "t == sizeof(byte)");
            BinIO.scalar_read(reader, out nsamples);
            BinIO.scalar_read(reader, out nc);
            BinIO.scalar_read(reader, out nf);
            data.Clear();
            for (int i = 0; i < nsamples; i++)
            {
                BinIO.narray_read(reader, data.Push(new Narray <byte>()));
            }
            BinIO.narray_read(reader, classes);
            CHECK_ARG(nf > 0 && nf < 1000000, "nf > 0 && nf < 1000000");
            CHECK_ARG(nc > 0 && nc < 1000000, "nc > 0 && nc < 1000000");
        }
Ejemplo n.º 3
0
 public override void Load(BinaryReader reader)
 {
     BinIO.narray_read(reader, data);
 }