Destutter graph/...

This commit is contained in:
kortschak 2014-06-28 13:29:16 +09:30
parent 913d567ae1
commit 40f3363cde
20 changed files with 188 additions and 189 deletions

View file

@ -18,7 +18,7 @@ import (
"github.com/google/cayley/graph"
)
func (ts *MemTripleStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool) {
func (ts *TripleStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, bool) {
switch it.Type() {
case "linksto":
return ts.optimizeLinksTo(it.(*graph.LinksToIterator))
@ -27,7 +27,7 @@ func (ts *MemTripleStore) OptimizeIterator(it graph.Iterator) (graph.Iterator, b
return it, false
}
func (ts *MemTripleStore) optimizeLinksTo(it *graph.LinksToIterator) (graph.Iterator, bool) {
func (ts *TripleStore) optimizeLinksTo(it *graph.LinksToIterator) (graph.Iterator, bool) {
l := it.GetSubIterators()
if l.Len() != 1 {
return it, false