示例#1
0
        public byte[] Condense(int level)
        {
            byte[] result = new byte[Size];

            namByteStream stream = new namByteStream(result);

            if (level == 1)
            {
                stream.Write(Intensity);

                int offset = 0;
                int i;

                for (i = 0; i < result.Length; i++)
                {
                    result[i] = result[i + offset];

                    offset += i;

                    if (offset >= result.Length)
                        break;

                    i++;
                }

                result = result.Take(i).ToArray();
            }
            else
            {
                result = Condense();
            }

            return result;
        }
示例#2
0
        public byte[] Condense()
        {
            byte[] result = new byte[Size];

            namByteStream stream = new namByteStream(result);

            stream.Write(Intensity);

            return result;
        }
示例#3
0
        public byte[] Condense()
        {
            byte[] result = new byte[Size];

            namByteStream stream = new namByteStream(result);

            foreach (var connection in Connections)
            {
                stream.Write(connection.Weight);
            }

            return result;
        }