Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Vectorial.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ struct Vector {
}
}

// checks if buffer is empty

bool is_empty() {
return entriesAdded == 0;
}

// checks if buffer is full

bool is_full() {
return entriesAdded == N;
}

T operator[](int idx) const {
return data[(entriesAdded - 1 - idx + 2*N) % N];
}
Expand Down