-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed wrong join condition by different edges * Introduced Path object - it collects edges and vertexes and isolate them within scope if the edges are the same * Introduced graph object * Refactored DFS algo for finding all subset vertexes and paths
- Loading branch information
Showing
11 changed files
with
481 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package subset | ||
|
||
type Edge struct { | ||
Id int | ||
Idx int | ||
A *TableLink | ||
B *TableLink | ||
} | ||
|
||
func NewEdge(id, idx int, a *TableLink, b *TableLink) *Edge { | ||
return &Edge{ | ||
Id: id, | ||
Idx: idx, | ||
A: a, | ||
B: b, | ||
} | ||
} | ||
|
||
func (e *Edge) GetLeftAndRightTable(idx int) (*TableLink, *TableLink) { | ||
if e.A.Idx == idx { | ||
return e.A, e.B | ||
} | ||
return e.B, e.A | ||
} |
Oops, something went wrong.