internal bool ValidateGraph(DAG pGraph)
        {
            var rooted    = Rooted();
            var cycleFree = true;//!HasCycles(pGraph);

            return(rooted && cycleFree);
        }
 public GraphProcessor(DAG dataDag, bool validation = true)
 {
     Graph = dataDag;
     if (validation)
     {
         if (!ValidateGraph(Graph))
         {
             throw new InvalidDataException("Invalid Data Input, Graph is cycled or has more than one root.");
         }
     }
 }
Example #3
0
 public WordNet(string graphInputFile, string synsetsFile, Action <int, int> progAction)
 {
     DataGraph = new DAG(synsetsFile, graphInputFile, progAction);
 }
Example #4
0
 public WordNet(string graphInputFile, string synsetsFile)
 {
     DataGraph = new DAG(synsetsFile, graphInputFile);
 }
 //TODO IMPLEMENT
 internal bool HasCycles(DAG pGraph)
 {
     throw new NotImplementedException();
 }