Skip to content

Commit

Permalink
Minor StyleCop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrnet committed Dec 20, 2008
1 parent 85ce4b3 commit 59e7834
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 68 deletions.
102 changes: 52 additions & 50 deletions src/app/MathNet.Iridium/Library/ComplexPolynomial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ Polynomial copy
)
{
int newOrder = copy.Order;

Complex[] newCoeff = new Complex[SizeOfOrder(newOrder)];
for(int i = 0; i < newCoeff.Length; i++)
{
newCoeff[i].Real = copy[i];
}

this.order = newOrder;
this.coefficients = newCoeff;
}
Expand Down Expand Up @@ -255,31 +257,31 @@ ComplexPolynomial polynomial2
return polynomial1.Equals(polynomial2);
}

///// <summary>
///// Check whether two polynomials have the same coefficients.
///// </summary>
//public static
//bool
//operator ==(
// ComplexPolynomial polynomial1,
// Polynomial polynomial2
// )
//{
// return polynomial1.Equals(polynomial2);
//}

///// <summary>
///// Check whether two polynomials have the same coefficients.
///// </summary>
//public static
//bool
//operator ==(
// Polynomial polynomial1,
// ComplexPolynomial polynomial2
// )
//{
// return polynomial2.Equals(polynomial1);
//}
/////// <summary>
/////// Check whether two polynomials have the same coefficients.
/////// </summary>
////public static
////bool
////operator ==(
//// ComplexPolynomial polynomial1,
//// Polynomial polynomial2
//// )
////{
//// return polynomial1.Equals(polynomial2);
////}

/////// <summary>
/////// Check whether two polynomials have the same coefficients.
/////// </summary>
////public static
////bool
////operator ==(
//// Polynomial polynomial1,
//// ComplexPolynomial polynomial2
//// )
////{
//// return polynomial2.Equals(polynomial1);
////}

/// <summary>
/// Check whether two polynomials have different coefficients.
Expand All @@ -294,31 +296,31 @@ ComplexPolynomial polynomial2
return !polynomial1.Equals(polynomial2);
}

///// <summary>
///// Check whether two polynomials have different coefficients.
///// </summary>
//public static
//bool
//operator !=(
// ComplexPolynomial polynomial1,
// Polynomial polynomial2
// )
//{
// return !polynomial1.Equals(polynomial2);
//}

///// <summary>
///// Check whether two polynomials have different coefficients.
///// </summary>
//public static
//bool
//operator !=(
// Polynomial polynomial1,
// ComplexPolynomial polynomial2
// )
//{
// return !polynomial2.Equals(polynomial1);
//}
/////// <summary>
/////// Check whether two polynomials have different coefficients.
/////// </summary>
////public static
////bool
////operator !=(
//// ComplexPolynomial polynomial1,
//// Polynomial polynomial2
//// )
////{
//// return !polynomial1.Equals(polynomial2);
////}

/////// <summary>
/////// Check whether two polynomials have different coefficients.
/////// </summary>
////public static
////bool
////operator !=(
//// Polynomial polynomial1,
//// ComplexPolynomial polynomial2
//// )
////{
//// return !polynomial2.Equals(polynomial1);
////}

/// <summary>
/// Check wether a polynomial is bigger than another polynomial.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class EigenvalueDecomposition

OnDemandComputation<Matrix> _blockDiagonalOnDemand;
OnDemandComputation<Matrix> _eigenVectorsOnDemand;
//OnDemandComputation<ComplexVector> _eigenValuesOnDemand;
////OnDemandComputation<ComplexVector> _eigenValuesOnDemand;

/// <summary>
/// Check for symmetry, then construct the eigenvalue decomposition
Expand Down Expand Up @@ -223,22 +223,22 @@ public Matrix EigenVectors
InitOnDemandComputations()
{
_blockDiagonalOnDemand = new OnDemandComputation<Matrix>(ComputeBlockDiagonalMatrix);
//_eigenValuesOnDemand = new OnDemandComputation<ComplexVector>(ComputeEigenValues);
////_eigenValuesOnDemand = new OnDemandComputation<ComplexVector>(ComputeEigenValues);
_eigenVectorsOnDemand = new OnDemandComputation<Matrix>(ComputeEigentVectors);
}

//ComplexVector
//ComputeEigenValues()
//{
// Complex[] eigenvalues = new Complex[n];
////ComplexVector
////ComputeEigenValues()
////{
//// Complex[] eigenvalues = new Complex[n];

// for(int i = 0; i < eigenvalues.Length; i++)
// {
// eigenvalues[i] = new Complex(d[i], e[i]);
// }
//// for(int i = 0; i < eigenvalues.Length; i++)
//// {
//// eigenvalues[i] = new Complex(d[i], e[i]);
//// }

// return new ComplexVector(eigenvalues);
//}
//// return new ComplexVector(eigenvalues);
////}

Matrix
ComputeBlockDiagonalMatrix()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,16 @@ public class SingularValueDecomposition

private enum IterationStep
{
/// <summary>if s[p] and e[k-1] are negligible and k&lt;p.</summary>
DeflateNeglible,

/// <summary>if s[k] is negligible and k&lt;p.</summary>
SplitAtNeglible,

/// <summary>if e[k-1] is negligible, k&lt;p, and s[k], ..., s[p] are not negligible.</summary>
QR,

/// <summary>if e[p-1] is negligible.</summary>
Convergence
}

Expand Down
10 changes: 5 additions & 5 deletions src/app/MathNet.Iridium/Library/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
[assembly: RegistryPermission(SecurityAction.RequestRefuse, Unrestricted=true)]

// NOTE (ruegg, 2008-11-11): The following 5 permissions have been commented out because they're not supported by mono yet
//[assembly: System.Net.SocketPermission(SecurityAction.RequestRefuse, Unrestricted=true)]
//[assembly: System.Net.WebPermission(SecurityAction.RequestRefuse, Unrestricted=true)]
//[assembly: System.Net.DnsPermission(SecurityAction.RequestRefuse, Unrestricted=true)]
//[assembly: System.Net.Mail.SmtpPermission(SecurityAction.RequestRefuse, Unrestricted=true)]
//[assembly: System.Net.NetworkInformation.NetworkInformationPermission(SecurityAction.RequestRefuse, Unrestricted=true)]
////[assembly: System.Net.SocketPermission(SecurityAction.RequestRefuse, Unrestricted = true)]
////[assembly: System.Net.WebPermission(SecurityAction.RequestRefuse, Unrestricted = true)]
////[assembly: System.Net.DnsPermission(SecurityAction.RequestRefuse, Unrestricted = true)]
////[assembly: System.Net.Mail.SmtpPermission(SecurityAction.RequestRefuse, Unrestricted = true)]
////[assembly: System.Net.NetworkInformation.NetworkInformationPermission(SecurityAction.RequestRefuse, Unrestricted = true)]

[assembly: AllowPartiallyTrustedCallers]

Expand Down
2 changes: 1 addition & 1 deletion src/app/MathNet.Iridium/Library/Properties/LocalStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ internal static string
{
return string.Format("{0} must be greater than or equal to {1}.", what, lowerBound);
}

internal static string
ArgumentOutOfRangeGreaterEqual(string what, string lowerBound)
{
Expand Down Expand Up @@ -277,6 +278,5 @@ internal static string
{
get { return "This special case is not supported yet (but is planned)."; }
}

}
}

0 comments on commit 59e7834

Please sign in to comment.