Exemplo n.º 1
0
        // Adapted from MultiEncoder
        public void AddEncoder(string fieldName, string name, IEncoder child)
        {
            base.AddEncoder(this, fieldName, name, child, width);

            foreach (Tuple d in child.GetDescription())
            {
                Tuple dT = d;
                description.Add(new Tuple(dT.Get(0), (int)dT.Get(1) + GetWidth()));
            }
            width += child.GetWidth();
        }
Exemplo n.º 2
0
        /**
         * {@inheritDoc}
         */
        public override void EncodeIntoArray(Tuple inputData, int[] output)
        {
            double longitude = (double)inputData.Get(0);
            double lattitude = (double)inputData.Get(1);
            double speed     = (double)inputData.Get(2);

            int[]  coordinate = CoordinateForPosition(longitude, lattitude);
            double radius     = RadiusForSpeed(speed);

            base.EncodeIntoArray(new Tuple(coordinate, radius), output);
        }
Exemplo n.º 3
0
 private bool IsValidEncoderPropertyTuple(Tuple encoderPropertyTuple)
 {
     return(encoderPropertyTuple != null && (int)encoderPropertyTuple.Get(0) != 0);
 }