Ejemplo n.º 1
0
        private static IBitVector GetValueBitVector(byte[,] imageData, IBitVectorFactory bitVectorFactory)
        {
            const byte height = 28;
            const byte width  = 28;
            const int  pixelRepresentationSizeInBits = 8;

            return(bitVectorFactory.Create(
                       GetActiveBitIndices(imageData, height, width, pixelRepresentationSizeInBits),
                       height * width * pixelRepresentationSizeInBits));
        }
 private IBitVector Punch(IBitVector bitVector, IReadOnlyCollection<int> indices)
 {
     return _bitVectorFactory.Create(PunchActiveBitIndices(bitVector, indices), indices.Count);
 }
Ejemplo n.º 3
0
 internal static IBitVector GetLabelBitVector(byte label, IBitVectorFactory bitVectorFactory)
 {
     return(bitVectorFactory.Create(
                GetActiveBitIndices(label).Where(i => i >= 4).Select(i => i - 4),
                4));
 }
 private static IBitVector GetLabelBitVector(byte label, IBitVectorFactory bitVectorFactory)
 {
     return(bitVectorFactory.Create(
                GetActiveBitIndices(label).Select(i => 7 - i),
                4));
 }