예제 #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());
     }
 }
예제 #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));
        }
예제 #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);
        }
예제 #4
0
 public void Rotate(VectorD rot)
 {
     //this * RotX(5);
 }
예제 #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));
 }