Skip to content

Commit

Permalink
fixed incorrect usage of hash table in ConnectionGraph
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/branches/MathCoreOSMC@4007 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Hannu Niemistö committed Apr 27, 2009
1 parent 9a44af2 commit 8db8fb3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Compiler/ConnectionGraph.mo
Expand Up @@ -327,18 +327,18 @@ algorithm
canon2 = canonical(partition,ref2);
(partition, true) = connectCanonicalComponents(partition,canon1,canon2);
dae = listAppend(dae, connectionDae);
print(Exp.printComponentRefStr(ref1));
/*print(Exp.printComponentRefStr(ref1));
print(" -- ");
print(Exp.printComponentRefStr(ref2));
print("\n");
print("\n");*/
then (partition, dae);
case(partition,ref1,ref2,_,connectionDae,dae)
equation
dae = listAppend(dae, connectionDae);
print(Exp.printComponentRefStr(ref1));
/*print(Exp.printComponentRefStr(ref1));
print(" -/- ");
print(Exp.printComponentRefStr(ref2));
print("\n");
print("\n");*/
then (partition, dae);
end matchcontinue;
end connectComponents;
Expand Down Expand Up @@ -375,14 +375,14 @@ function addRootsToTable
algorithm
outTable := matchcontinue(inTable, inRoots, inFirstRoot)
local
HashTableCG.HashTable table, table1, table2;
HashTableCG.HashTable table;
Exp.ComponentRef root, firstRoot;
list<Exp.ComponentRef> tail;
case(table, (root::tail), firstRoot)
equation
table1 = HashTableCG.add((root,firstRoot), table);
table2 = addRootsToTable(table, tail, firstRoot);
then table2;
table = HashTableCG.add((root,firstRoot), table);
table = addRootsToTable(table, tail, firstRoot);
then table;
case(table, {}, _)
then table;
end matchcontinue;
Expand Down

0 comments on commit 8db8fb3

Please sign in to comment.