Exemplo n.º 1
0
 /// <summary>
 /// Discards the direction vectors and any corresponding data of the oldest PCG iterations.
 /// </summary>
 /// <param name="numOldVectorsToRemove">
 /// The number of the oldest entries (direction vectors and corresponding data) to discard. If it exceeds the number of
 /// entries currently stored, they will all be discarded without throwing any exceptions.
 /// </param>
 public void RemoveOldDirectionVectorData(int numOldVectorsToRemove)
 {
     if (numOldVectorsToRemove > Directions.Count)
     {
         Directions.Clear();
         MatrixTimesDirections.Clear();
         DirectionsTimesMatrixTimesDirections.Clear();
     }
     else
     {
         Directions.RemoveRange(0, numOldVectorsToRemove);
         MatrixTimesDirections.RemoveRange(0, numOldVectorsToRemove);
         DirectionsTimesMatrixTimesDirections.RemoveRange(0, numOldVectorsToRemove);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Discards the direction vectors and any corresponding data of the newest PCG iterations.
 /// </summary>
 /// <param name="numOldVectorsToRemove">
 /// The number of the newest entries (direction vectors and corresponding data) to discard. If it exceeds the number of
 /// entries currently stored, they will all be discarded without throwing any exceptions.
 /// </param>
 public void RemoveNewDirectionVectorData(int numNewVectorsToRemove)
 {
     if (numNewVectorsToRemove > Directions.Count)
     {
         Directions.Clear();
         MatrixTimesDirections.Clear();
         DirectionsTimesMatrixTimesDirections.Clear();
     }
     else
     {
         int start = Directions.Count - numNewVectorsToRemove;
         Directions.RemoveRange(start, numNewVectorsToRemove);
         MatrixTimesDirections.RemoveRange(start, numNewVectorsToRemove);
         DirectionsTimesMatrixTimesDirections.RemoveRange(start, numNewVectorsToRemove);
     }
 }
Exemplo n.º 3
0
 public void Clear()
 {
     Directions.Clear();
     MatrixTimesDirections.Clear();
     DirectionsTimesMatrixTimesDirections.Clear();
 }