Skip to content

Commit 629b7aa

Browse files
committed
ostream for resizeable
1 parent 440cdba commit 629b7aa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/sketch/sketch_columns.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ class ResizeableSketchColumn {
109109
}
110110

111111
void serialize(std::ostream &binary_out) const;
112+
113+
friend std::ostream& operator<<(std::ostream &os, const ResizeableSketchColumn&sketch) {
114+
os << "ResizeableSketchColumn: " << std::endl;
115+
os << "Capacity: " << (int)sketch.capacity << std::endl;
116+
os << "Column Index: " << (int)sketch.col_idx << std::endl;
117+
os << "Deterministic Bucket: " << sketch.deterministic_bucket << std::endl;
118+
for (size_t i = 0; i < sketch.capacity; ++i) {
119+
os << "Bucket[" << i << "]: " << sketch.aligned_buckets[i] << std::endl;
120+
}
121+
return os;
122+
}
123+
112124
bool operator==(const ResizeableSketchColumn &other) const {
113125
for (size_t i = 0; i < capacity; ++i) {
114126
if (aligned_buckets[i] != other.aligned_buckets[i]) {

0 commit comments

Comments
 (0)