Commit graph

29 commits

Author SHA1 Message Date
ben hockey
678c7c843a move cmp to where it's used 2015-05-27 16:50:54 -05:00
Andrew Dunham
189961cb8d Remove deprecated ResultTree API 2015-04-28 15:57:35 -07:00
Andrew Dunham
0355b89f54 Don't save non-errors in the memstore iterator
As per the following link, io.EOF is returned to signal "no more items".
Thus, we don't treat this as an error, and don't save it.

https://godoc.org/github.com/cznic/b#Enumerator
2015-04-15 11:46:26 -07:00
Andrew Dunham
1b6395ed0a Make Close() method on Iterators return an error 2015-04-14 20:17:31 -07:00
Andrew Dunham
9cdeb519d7 Fix Err fallout for graph/memstore iterators 2015-04-14 18:56:05 -07:00
Andrew Dunham
6aad2b1818 Add static type assertions
Assert that various iterators satisfy the graph.Nexter interface
2015-04-14 16:28:46 -07:00
kortschak
e2eea6c283 Convert Type fields to use graph.Type
Add text encoding methods to replace string storage.
2014-09-05 09:49:15 +09:30
kortschak
62013d3dfc Replace DebugString with Describe
This change makes tree description completely open to mechanical
analysis and ensures consistency between description formats for each of
the iterator types.

Renamed StatsContainer.(Kind -> Type) for consistency.
2014-09-05 09:32:09 +09:30
kortschak
443a091b72 Rename triple entities were relevant 2014-08-27 21:27:01 +09:30
kortschak
4a92ae9758 Merge branch 'log_database' into b
Conflicts:
	graph/memstore/iterator.go
	graph/memstore/triplestore.go
2014-08-13 17:15:11 +09:30
kortschak
2540ea8f87 Use cznic/b for index store
$ benchcmp gollrb.bench b-gen.bench
benchmark                                   old ns/op       new ns/op	delta
BenchmarkNamePredicate                      1731218         1693373		-2.19%
BenchmarkLargeSetsNoIntersection            81290360        70205277	-13.64%
BenchmarkVeryLargeSetsSmallIntersection     768135620       442906243	-42.34%
BenchmarkHelplessContainsChecker            39477086024     35260603748	-10.68%
BenchmarkNetAndSpeed                        22510637        21587975	-4.10%
BenchmarkKeanuAndNet                        18018886        17795328	-1.24%
BenchmarkKeanuAndSpeed                      20336586        20560228	+1.10%
BenchmarkKeanuOther                         85495040        80718152	-5.59%
BenchmarkKeanuBullockOther                  95457792        83868434	-12.14%

Code gen from $GOPATH/src/github.com/cznic/b:

  make generic \
| sed -e 's/KEY/int64/g' -e 's/VALUE/struct{}/g' \
> $GOPATH/src/github.com/google/cayley/graph/memstore/b/keys.go

key_test.go manually edited.
2014-08-11 20:45:55 +09:30
a1e5a53dd5 Merge with new Next() interface 2014-08-10 17:59:09 -04:00
dcb495d145 Make Memstore work with the QuadWriter 2014-08-04 01:56:49 -04:00
kortschak
b1a70d99aa Simplify Nexter interface
This change allows a Nexter to be used in the same manner as a scanner
using a for graph.Next(it) {} construction.

It is important that graph.Next(it) and any associated it.Result() calls
operate on the same iterator.
2014-08-01 09:15:02 +09:30
kortschak
f8e28e066e Rename NextResult -> NextPath
See discussion in #92.
2014-08-01 07:27:16 +09:30
kortschak
1606e98d9f Rename Check-ish -> Contains-ish
Contains[*] indicates what the check is for.

[*] I considered Has/Have, but settled on Contains to avoid confusion
with the HasA iterator.
2014-07-31 15:29:42 +09:30
kortschak
d6f94be514 Base nexting on interface satisfaction
This is done unsubtlely at the moment and there is plenty of room for
optimisation of assertion location to prevent repeated reasserting as is
done now.
2014-07-30 16:06:46 +09:30
kortschak
b498a06a7b Intermediate step in removal of Base
We are marking types that will be Nexters and ResultNexters (I want a
better name for this one).
2014-07-30 15:21:48 +09:30
kortschak
375d953d93 Move current result handling out of Base
Delete majority of Base functionality.
2014-07-30 15:03:06 +09:30
kortschak
525230206a Move SubIterator handling out of Base 2014-07-30 12:11:14 +09:30
kortschak
01b7278c3a Move UID handling from Base
Also clean up some of the value creation code.
2014-07-30 11:44:58 +09:30
kortschak
1604dca737 Move tag handling out into graph.Tagger 2014-07-30 10:25:32 +09:30
Jeremy Jay
e780c1ceb9 Register should be RegisterIterator 2014-07-16 13:49:39 -04:00
kortschak
cd46452b63 Enumerate iterator types 2014-07-03 09:57:31 +09:30
kortschak
d87e227ff3 Rename TSVal 2014-07-02 12:13:15 +09:30
kortschak
8576f66d20 Reduce graph.Iterator method names 2014-07-02 11:02:09 +09:30
kortschak
1768e593a8 Move iterators into separate package
Also reduce API exposure and use standard library more - and fix bugs I
previously introduces in mongo.
2014-07-01 09:21:32 +09:30
kortschak
40f3363cde Destutter graph/... 2014-06-28 13:29:16 +09:30
kortschak
47c9752e5e Destutter filenames 2014-06-28 12:31:33 +09:30