public void SetSparsePattern(int[] SourceKey)
{
if (SourceKey.Max()>Dim)
{
throw new Exception("The dimension of the SourceKey exceeds the original dimension of the sparse column vector.");
}
nNonzero = SourceKey.Length;
Key = SourceKey;
Val = new float[nNonzero];
}