Skip to content
Snippets Groups Projects
Commit 58240432 authored by Paul Nitzke's avatar Paul Nitzke
Browse files

Complete documentation for MatrixMarketReader

* Might be changed in the future as it's currently unclear when
  checkHeader returns true
parent 0fe92410
Branches
No related tags found
1 merge request!27Complete documentation and streamline coding style a bit
......@@ -4,9 +4,11 @@ using Transform.Convert;
namespace SparseTransform.Convert
{
/// <summary>
/// Provides an IReader implementation to read a MatrixMarket string.
/// </summary>
internal class MatrixMarketReader : IReader
{
public IGraph ReadGraph(string matrix)
{
string[] lines = matrix.Split(
......@@ -57,7 +59,7 @@ namespace SparseTransform.Convert
/// checks with ANTLR4.0 whether the header is a valid instance. The header grammar can be found in the file MMFHeader.g4
/// </summary>
/// <param name="header">header of the MMF-input</param>
/// <returns></returns>
/// <returns>true if matrix is not symmetric</returns>
private bool checkHeader(string header)
{
AntlrInputStream stream = new AntlrInputStream(header);
......@@ -70,7 +72,6 @@ namespace SparseTransform.Convert
return visitor.Visit(speakParser.header());
}
/// <summary>
/// checks whether the comment-section is valid.
/// </summary>
......@@ -102,7 +103,6 @@ namespace SparseTransform.Convert
}
}
/// <summary>
/// creates a graph from the data-section of the MMF-input and meanwhile checks whether the data-section is valid
/// </summary>
......@@ -135,8 +135,6 @@ namespace SparseTransform.Convert
}
}
/// <summary>
/// computes the first data-line in the MMF-input
/// </summary>
......
......@@ -11,7 +11,7 @@ namespace Transform.Convert
/// visits the AST and helps to decide whether the input matrix is symmetric
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
/// <returns>true if the input matrix is not symmetric</returns>
public override bool VisitHeader([NotNull] MMFHeaderParser.HeaderContext context)
{
if ((context.format().choice1() is null || context.format().choice1().GENERAL() is null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment