File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ class Sketch {
8282 * @return The length of the vector to sketch
8383 */
8484 static vec_t calc_vector_length (node_id_t num_vertices) {
85- // return ceil(double(num_vertices) * (num_vertices - 1) / 2);
86- return num_vertices * 2 ;
85+ return ceil (double (num_vertices) * (num_vertices - 1 ) / 2 );
86+ // return num_vertices * 2;
8787 // return 50; // round to something thats approx 2^6
8888 // return 3;
8989 // return 15;
Original file line number Diff line number Diff line change @@ -38,9 +38,8 @@ class FixedSizeSketchColumn {
3838 uint8_t get_depth () const ;
3939 void serialize (std::ostream &binary_out) const ;
4040
41- static uint8_t suggest_capacity (size_t num_vertices) {
42- size_t num_edges = num_vertices * (num_vertices - 1 ) / 2 ;
43- return static_cast <uint8_t >(1 + ceil (log2 (num_edges)));
41+ static uint8_t suggest_capacity (size_t num_indices) {
42+ return static_cast <uint8_t >(2 + ceil (log2 (num_indices)));
4443 }
4544
4645 void reset_sample_state () {
@@ -107,7 +106,7 @@ class ResizeableSketchColumn {
107106 // no-op
108107 };
109108
110- static uint8_t suggest_capacity (size_t num_vertices ) {
109+ static uint8_t suggest_capacity (size_t num_indices ) {
111110 return 4 ;
112111 }
113112
@@ -171,7 +170,7 @@ class ResizeableAlignedSketchColumn {
171170 // no-op
172171 };
173172
174- static uint8_t suggest_capacity (size_t num_vertices ) {
173+ static uint8_t suggest_capacity (size_t num_indices ) {
175174 return 4 ;
176175 }
177176
You can’t perform that action at this time.
0 commit comments