Beispiel #1
0
 /// <summary>
 /// Recalculates the expression values and stores them in a VectorD
 /// </summary>
 public void Recalculate()
 {
     values = new VectorD(expressions.Length);
     for (int i = 0; i < expressions.Length; i++)
     {
         values.At(i, expressions[i].Evaluate());
     }
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vec"></param>
        /// <param name="A"></param>
        /// <returns></returns>
        public static MatrixD TranslateMatrix(VectorD vec, MatrixD A)
        {
            Matrix <double> trans = Matrix <double> .Build.Dense(A.RowCount, A.ColumnCount, 0);

            for (int i = 0; i < vec.Count; i++)
            {
                trans.SetRow(i, Vector <double> .Build.Dense(A.ColumnCount, vec.At(i)));
            }
            return(ConvertMatrix((DenseMatrix)trans + A));
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="vec"></param>
        /// <param name="A"></param>
        /// <returns></returns>
        public void Translate(VectorD vec)
        {
            Matrix <double> trans = Matrix <double> .Build.Dense(RowCount, ColumnCount, 0);

            for (int i = 0; i < vec.Count; i++)
            {
                trans.SetRow(i, Vector <double> .Build.Dense(ColumnCount, vec.At(i)));
            }
            SetSubMatrix(0, 0, trans + this);
        }
Beispiel #4
0
 public void Rotate(VectorD rot)
 {
     //this * RotX(5);
 }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vec"></param>
 /// <param name="A"></param>
 /// <returns></returns>
 public static MatrixD RotateMatrix(VectorD vec, MatrixD A)
 {
     return(RotateMatrix(vec.At(0), vec.At(1), vec.At(2), A));
 }