Skip to content

Commit 7687d11

Browse files
committed
added reset_sample_state as interface requirement and made it a no-op
1 parent 2c633f5 commit 7687d11

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/sketch/sketch_columns.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class FixedSizeSketchColumn {
3535
void merge(FixedSizeSketchColumn &other);
3636
uint8_t get_depth() const;
3737
void serialize(std::ostream &binary_out) const;
38+
void reset_sample_state() {
39+
//no-op
40+
};
3841
friend std::ostream& operator<<(std::ostream &os, const FixedSizeSketchColumn &sketch) {
3942
os << "FixedSizeSketchColumn: " << std::endl;
4043
os << "Capacity: " << (int)sketch.capacity << std::endl;
@@ -133,6 +136,9 @@ class ResizeableSketchColumn {
133136
void update(const vec_t update);
134137
void merge(ResizeableSketchColumn &other);
135138
uint8_t get_depth() const;
139+
void reset_sample_state() {
140+
//no-op
141+
};
136142
void serialize(std::ostream &binary_out) const;
137143
private:
138144
void reallocate(uint8_t new_capacity);

include/sketch/sketch_concept.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ concept SketchColumnConcept = requires(T t, T other) {
4242
{ t.get_seed() } -> std::same_as<uint64_t>;
4343

4444
{ t.serialize(std::declval<std::ostream&>()) };
45+
{ t.reset_sample_state()} -> std::same_as<void>;
4546
};
4647

4748
/*

0 commit comments

Comments
 (0)