Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 6a23ba5

Browse files
authored
Merge branch 'master' into master
2 parents f9d3d66 + 873cbe9 commit 6a23ba5

File tree

7 files changed

+318
-77
lines changed

7 files changed

+318
-77
lines changed

src/include/binder/bind_node_visitor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class Catalog;
3838

3939
namespace binder {
4040

41+
/**
42+
* @brief Interface to be notified of the composition of a bind node.
43+
*/
4144
class BindNodeVisitor : public SqlNodeVisitor {
4245
public:
4346
BindNodeVisitor(concurrency::TransactionContext *txn,

src/include/binder/binder_context.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ class BinderContext {
153153
std::vector<std::unique_ptr<expression::AbstractExpression>> &exprs);
154154

155155
private:
156-
/**
157-
* @brief Map table alias to table obj
158-
*/
156+
/** @brief Map table alias to table obj */
159157
std::unordered_map<std::string, std::shared_ptr<catalog::TableCatalogObject>>
160158
regular_table_alias_map_;
161159
std::unordered_map<std::string, std::unordered_map<std::string, type::TypeId>>

src/include/brain/brain_util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//===----------------------------------------------------------------------===//
32
//
43
// Peloton

src/include/brain/clusterer.h

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ namespace brain {
3030
// Clusterer
3131
//===--------------------------------------------------------------------===//
3232

33-
// Column Id to < Tile Id, Tile Column Id >
33+
/**
34+
* Column Id to < Tile Id, Tile Column Id >
35+
*/
3436
typedef std::map<oid_t, std::pair<oid_t, oid_t>> column_map_type;
3537

36-
// Sequential k-Means Clustering
38+
/**
39+
* Sequential k-Means Clustering
40+
*/
3741
class Clusterer : public Printable {
3842
public:
3943
Clusterer(oid_t cluster_count, oid_t sample_column_count,
@@ -46,47 +50,76 @@ class Clusterer : public Printable {
4650
sample_count_(0),
4751
sample_column_count_(sample_column_count) {}
4852

53+
/**
54+
* @brief Gets the cluster count.
55+
*
56+
* @return The cluster count.
57+
*/
4958
oid_t GetClusterCount() const { return cluster_count_; }
5059

51-
// process the sample and update the means
60+
/**
61+
* process the sample and update the means
62+
*
63+
* @param[in] sample The sample
64+
*/
5265
void ProcessSample(const Sample &sample);
5366

54-
// find closest cluster for the given sample
67+
/**
68+
* find closest cluster for the given sample
69+
*
70+
* @param[in] sample The sample
71+
*/
5572
oid_t GetClosestCluster(const Sample &sample);
5673

57-
// get cluster mean sample
74+
/**
75+
* get cluster mean sample
76+
*
77+
* @param[in] cluster_offset The cluster offset
78+
*/
5879
Sample GetCluster(oid_t cluster_offset) const;
5980

60-
// get history
81+
/**
82+
* get history
83+
*
84+
* @param[in] cluster_offset The cluster offset
85+
*
86+
* @return The fraction.
87+
*/
6188
double GetFraction(oid_t cluster_offset) const;
6289

63-
// get partitioning
90+
/**
91+
* get partitioning
92+
*
93+
* @param[in] tile_count The tile count
94+
*/
6495
column_map_type GetPartitioning(oid_t tile_count) const;
6596

66-
// Get a string representation for debugging
97+
/**
98+
* Get a string representation for debugging
99+
*/
67100
const std::string GetInfo() const;
68101

69102
private:
70103
//===--------------------------------------------------------------------===//
71104
// MEMBERS
72105
//===--------------------------------------------------------------------===//
73106

74-
// # of clusters
107+
/** # of clusters */
75108
oid_t cluster_count_;
76109

77-
// means_
110+
/** means_ */
78111
std::vector<Sample> means_;
79112

80-
// history
113+
/** history */
81114
std::vector<int> closest_;
82115

83-
// weight for new sample
116+
/** weight for new sample */
84117
double new_sample_weight_;
85118

86-
// sample count
119+
/** sample count */
87120
int sample_count_;
88121

89-
// sample column count
122+
/** sample column count */
90123
oid_t sample_column_count_;
91124
};
92125

0 commit comments

Comments
 (0)