public Vector GetValue(StateVarKey <Vector> key)
        {
            Vector value;

            if (!Vdata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
        public Matrix <double> GetValue(StateVarKey <Matrix <double> > key)
        {
            Matrix <double> value;

            if (!Mdata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
        public bool GetValue(StateVarKey <bool> key)
        {
            bool value;

            if (!Bdata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
        public int GetValue(StateVarKey <int> key)
        {
            int value;

            if (!Idata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
        public double GetValue(StateVarKey <double> key)
        {
            double value;

            if (!Ddata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
        public Quat GetValue(StateVarKey <Quat> key)
        {
            Quat value;

            if (!Qdata.TryGetValue(key, out value))
            {
                throw new KeyNotFoundException();
            }
            return(value);
        }
Пример #7
0
        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            StateVarKey <T> p = obj as StateVarKey <T>;

            return(VarName == p.VarName);
        }
 public void Add(StateVarKey <Vector> key, Vector value)
 {
     Vdata.AddOrUpdate(key, value, (k, oldValue) => value);
 }
 public void Add(StateVarKey <Matrix <double> > key, Matrix <double> value)
 {
     Mdata.AddOrUpdate(key, value, (k, oldValue) => value);
 }
Пример #10
0
 public void Add(StateVarKey <bool> key, bool value)
 {
     Bdata.AddOrUpdate(key, value, (k, oldValue) => value);
 }
Пример #11
0
 public void Add(StateVarKey <int> key, int value)
 {
     Idata.AddOrUpdate(key, value, (k, oldValue) => value);
 }
Пример #12
0
 public void Add(StateVarKey <double> key, double value)
 {
     Ddata.AddOrUpdate(key, value, (k, oldValue) => value);
 }
Пример #13
0
 public void Add(StateVarKey <Quat> key, Quat value)
 {
     Qdata.AddOrUpdate(key, value, (k, oldValue) => value);
 }