diff --git a/docs/HTML/drop_missing.html b/docs/HTML/drop_missing.html index 27c6bb7b..e25ff120 100644 --- a/docs/HTML/drop_missing.html +++ b/docs/HTML/drop_missing.html @@ -43,13 +43,13 @@ Signature Description - -

-enum class drop_policy : unsigned charĀ  {
-    all = 1,      // Remove row if all columns are nan
-    any = 2,      // Remove row if any column is nan
-    threshold = 3 // Remove row if threshold number of columns are nan
-}; 
+ +
enum class drop_policy : unsigned char  {
+    all = 1,      // Remove row if all columns are nan
+    any = 2,      // Remove row if any column is nan
+    threshold = 3 // Remove row if threshold number of columns are nan
+};
+
This policy specifies what rows to drop/remove based on missing column data
@@ -69,12 +69,11 @@ Signature Description Parameters - -

-template<typename ... Ts>
-void
-drop_missing(drop_policy policy, std::size_t threshold = 0);
-        
+ +
template<typename ... Ts>
+void
+drop_missing(drop_policy policy, std::size_t threshold = 0);
+
It removes a row if any or all or some of the columns are NaN, based on drop policy @@ -95,38 +94,38 @@ Signature Description - -

-enum class fill_policy : unsigned char  {
-    // Fill all missing values with the given substitute
-    //
-    value = 1,
-
-    // Fill the missing values with the previous value
-    //
-    fill_forward = 2,
-
-    // Fill the missing values with the next value
-    //
-    fill_backward = 3,
-
-    //           X - X1
-    // Y = Y1 + --------- * (Y2 - Y1)
-    //           X2 - X1
-    // Use the index column as X coordinate and the given column as Y coordinate
-    //
-    linear_interpolate = 4,
-
-    // Fill missing values with mid-point of surrounding values
-    //
-    mid_point = 5,
-
-    // O(n2) algorithm for each missing value. It uses the index as X coordinate
-    // This is very much a garbage in, garbage out algorithm.
-    // The index and column data must be in the same scale and be correlated.
-    //
-    lagrange_interpolate = 6,
-};
+ +
enum class fill_policy : unsigned char  {
+    // Fill all missing values with the given substitute
+    //
+    value = 1,
+
+    // Fill the missing values with the previous value
+    //
+    fill_forward = 2,
+
+    // Fill the missing values with the next value
+    //
+    fill_backward = 3,
+
+    //           X - X1
+    // Y = Y1 + --------- * (Y2 - Y1)
+    //           X2 - X1
+    // Use the index column as X coordinate and the given column as Y coordinate
+    //
+    linear_interpolate = 4,
+
+    // Fill missing values with mid-point of surrounding values
+    //
+    mid_point = 5,
+
+    // O(n2) algorithm for each missing value. It uses the index as X coordinate
+    // This is very much a garbage in, garbage out algorithm.
+    // The index and column data must be in the same scale and be correlated.
+    //
+    lagrange_interpolate = 6,
+};
+
This policy determines how to fill missing values in the DataFrame
@@ -143,15 +142,14 @@ Signature Description Parameters - -

-template<typename T>
-void
-fill_missing(const std::vector &col_names,
-             fill_policy policy,
-             const std::vector &values = { },
-             int limit = -1);
-        
+ +
template<typename T>
+void
+fill_missing(const std::vector &col_names,
+             fill_policy policy,
+             const std::vector &values = { },
+             int limit = -1);
+
It fills all the "missing values" with the given values, and/or using the given method @@ -169,12 +167,12 @@ - -

-template<typename DF, typename ... Ts>
-void
-fill_missing(const DF &rhs);
-        
+ +
template<typename DF, typename ... Ts>
+void
+fill_missing(const DF &rhs);
+
+
It fills the missing values in all columns in self by investigating the rhs DataFrame. It attempts to find columns with the same name and type in rhs. If there are such columns in rhs, it fills the missing values in the corresponding columns in self that also have the same index value.

diff --git a/docs/HTML/get_above_quantile_data.html b/docs/HTML/get_above_quantile_data.html index 4daf14a3..1d656de6 100644 --- a/docs/HTML/get_above_quantile_data.html +++ b/docs/HTML/get_above_quantile_data.html @@ -43,13 +43,12 @@ - -

-template<comparable T, typename ... Ts>
-DataFrame
-get_above_quantile_data(const char *col_name,
-                        double quantile) const;
-        
+ +
template<comparable T, typename ... Ts>
+DataFrame
+get_above_quantile_data(const char *col_name,
+                        double quantile) const;
+
This returns a new DataFrame with rows greater than or equal to the specified quantile of the given column. The row equal to the quantile is also included. The returned DataFrame rows will be in the same order as self.

@@ -66,13 +65,12 @@ - -

-template<comparable T, typename ... Ts>
-PtrView
-get_above_quantile_view(const char *col_name,
-                        double quantile);
-        
+ +
template<comparable T, typename ... Ts>
+PtrView
+get_above_quantile_view(const char *col_name,
+                        double quantile);
+
This is identical to above get_above_quantile_data(), but:
@@ -92,13 +90,12 @@ - -

-template<comparable T, typename ... Ts>
-ConstPtrView
-get_above_quantile_view(const char *col_name,
-                        double quantile) const;
-        
+ +
template<comparable T, typename ... Ts>
+ConstPtrView
+get_above_quantile_view(const char *col_name,
+                        double quantile) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. @@ -113,13 +110,12 @@ - -

-template<comparable T, typename ... Ts>
-DataFrame
-get_below_quantile_data(const char *col_name,
-                        double quantile) const;
-        
+ +
template<comparable T, typename ... Ts>
+DataFrame
+get_below_quantile_data(const char *col_name,
+                        double quantile) const;
+
This returns a new DataFrame with rows less than the specified quantile of the given column. The row equal to the quantile is excluded. The returned DataFrame rows will be in the same order as self.

@@ -136,13 +132,12 @@ - -

-template<comparable T, typename ... Ts>
-PtrView
-get_below_quantile_view(const char *col_name,
-                        double quantile);
-        
+ +
template<comparable T, typename ... Ts>
+PtrView
+get_below_quantile_view(const char *col_name,
+                        double quantile);
+
This is identical to below get_below_quantile_data(), but:
@@ -162,13 +157,12 @@ - -

-template<comparable T, typename ... Ts>
-ConstPtrView
-get_below_quantile_view(const char *col_name,
-                        double quantile) const;
-        
+ +
template<comparable T, typename ... Ts>
+ConstPtrView
+get_below_quantile_view(const char *col_name,
+                        double quantile) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data.html b/docs/HTML/get_data.html index 16396524..bdc67f95 100644 --- a/docs/HTML/get_data.html +++ b/docs/HTML/get_data.html @@ -43,12 +43,11 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame<I>
-get_data(const std::vector<const char *> col_names) const;
-        
+ +
template<typename ... Ts>
+DataFrame<I>
+get_data(const std::vector<const char *> col_names) const;
+
This returns a DataFrame with index and col_names copied from the original DataFrame @@ -60,12 +59,11 @@ - -

-template<typename ... Ts>
-View
-get_view(const std::vector<const char *> col_names);
-        
+ +
template<typename ... Ts>
+View
+get_view(const std::vector<const char *> col_names);
+
It behaves like get_data(), but it returns a View. A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.
@@ -78,12 +76,11 @@ - -

-template<typename ... Ts>
-ConstView
-get_view(const std::vector<const char *> col_names) const;
-        
+ +
template<typename ... Ts>
+ConstView
+get_view(const std::vector<const char *> col_names) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_after_times.html b/docs/HTML/get_data_after_times.html index d0feb217..71b7b2e1 100644 --- a/docs/HTML/get_data_after_times.html +++ b/docs/HTML/get_data_after_times.html @@ -43,15 +43,14 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame<DateTime, H>
-get_data_after_times(DateTime::HourType hour,  // 24 hour
-                     DateTime::MinuteType minute = 0,
-                     DateTime::SecondType second = 0,
-                     DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+DataFrame<DateTime, H>
+get_data_after_times(DateTime::HourType hour,  // 24 hour
+                     DateTime::MinuteType minute = 0,
+                     DateTime::SecondType second = 0,
+                     DateTime::MillisecondType msec = 0) const;
+
This selects the rows using the index column that happen after the specified time. It returns another DataFrame with selected data indexed by DateTime. The specified times are excluded. Self is unchanged.

@@ -67,15 +66,14 @@ - -

-template<typename ... Ts>
-PtrView
-get_view_after_times(DateTime::HourType hour,  // 24 hour
-                     DateTime::MinuteType minute = 0,
-                     DateTime::SecondType second = 0,
-                     DateTime::MillisecondType msec = 0);
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_after_times(DateTime::HourType hour,  // 24 hour
+                     DateTime::MinuteType minute = 0,
+                     DateTime::SecondType second = 0,
+                     DateTime::MillisecondType msec = 0);
+
It behaves like get_data_after_times(), but it returns a View. A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.

@@ -91,15 +89,14 @@ - -

-template<typename ... Ts>
-ConstPtrView
-get_view_after_times(DateTime::HourType hour,  // 24 hour
-                     DateTime::MinuteType minute = 0,
-                     DateTime::SecondType second = 0,
-                     DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+ConstPtrView
+get_view_after_times(DateTime::HourType hour,  // 24 hour
+                     DateTime::MinuteType minute = 0,
+                     DateTime::SecondType second = 0,
+                     DateTime::MillisecondType msec = 0) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_at_times.html b/docs/HTML/get_data_at_times.html index 7f6615e2..d946afcf 100644 --- a/docs/HTML/get_data_at_times.html +++ b/docs/HTML/get_data_at_times.html @@ -43,15 +43,14 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame<DateTime, H>
-get_data_at_times(DateTime::HourType hour,  // 24 hour
-                  DateTime::MinuteType minute = 0,
-                  DateTime::SecondType second = 0,
-                  DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+DataFrame<DateTime, H>
+get_data_at_times(DateTime::HourType hour,  // 24 hour
+                  DateTime::MinuteType minute = 0,
+                  DateTime::SecondType second = 0,
+                  DateTime::MillisecondType msec = 0) const;
+
This selects the rows using the index column at specified time. It returns another DataFrame with selected data indexed by DateTime. Self is unchanged.

@@ -67,15 +66,14 @@ - -

-template<typename ... Ts>
-PtrView
-get_view_at_times(DateTime::HourType hour,  // 24 hour
-                  DateTime::MinuteType minute = 0,
-                  DateTime::SecondType second = 0,
-                  DateTime::MillisecondType msec = 0);
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_at_times(DateTime::HourType hour,  // 24 hour
+                  DateTime::MinuteType minute = 0,
+                  DateTime::SecondType second = 0,
+                  DateTime::MillisecondType msec = 0);
+
It behaves like get_data_at_times(), but it returns a View. A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.

@@ -91,15 +89,14 @@ - -

-template<typename ... Ts>
-ConstPtrView
-get_view_at_times(DateTime::HourType hour,  // 24 hour
-                  DateTime::MinuteType minute = 0,
-                  DateTime::SecondType second = 0,
-                  DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_at_times(DateTime::HourType hour,  // 24 hour
+                  DateTime::MinuteType minute = 0,
+                  DateTime::SecondType second = 0,
+                  DateTime::MillisecondType msec = 0);
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_before_times.html b/docs/HTML/get_data_before_times.html index c72f6dd9..401c64ba 100644 --- a/docs/HTML/get_data_before_times.html +++ b/docs/HTML/get_data_before_times.html @@ -43,15 +43,14 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame<DateTime, H>
-get_data_before_times(DateTime::HourType hour,  // 24 hour
-                      DateTime::MinuteType minute = 0,
-                      DateTime::SecondType second = 0,
-                      DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+DataFrame<DateTime, H>
+get_data_before_times(DateTime::HourType hour,  // 24 hour
+                      DateTime::MinuteType minute = 0,
+                      DateTime::SecondType second = 0,
+                      DateTime::MillisecondType msec = 0) const;
+
This selects the rows using the index column that happen before the specified time. It returns another DataFrame with selected data indexed by DateTime. The specified times are excluded. Self is unchanged.

@@ -67,15 +66,14 @@ - -

-template<typename ... Ts>
-PtrView
-get_view_before_times(DateTime::HourType hour,  // 24 hour
-                      DateTime::MinuteType minute = 0,
-                      DateTime::SecondType second = 0,
-                      DateTime::MillisecondType msec = 0);
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_before_times(DateTime::HourType hour,  // 24 hour
+                      DateTime::MinuteType minute = 0,
+                      DateTime::SecondType second = 0,
+                      DateTime::MillisecondType msec = 0);
+
It behaves like get_data_before_times(), but it returns a View. A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.

@@ -91,15 +89,14 @@ - -

-template<typename ... Ts>
-ConstPtrView
-get_view_before_times(DateTime::HourType hour,  // 24 hour
-                      DateTime::MinuteType minute = 0,
-                      DateTime::SecondType second = 0,
-                      DateTime::MillisecondType msec = 0) const;
-        
+ +
template<typename ... Ts>
+ConstPtrView
+get_view_before_times(DateTime::HourType hour,  // 24 hour
+                      DateTime::MinuteType minute = 0,
+                      DateTime::SecondType second = 0,
+                      DateTime::MillisecondType msec = 0) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_between_times.html b/docs/HTML/get_data_between_times.html index 3cfce404..9942567d 100644 --- a/docs/HTML/get_data_between_times.html +++ b/docs/HTML/get_data_between_times.html @@ -43,19 +43,18 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame<DateTime, H>
-get_data_between_times(DateTime::HourType start_hour,  // 24 hour
-                       DateTime::HourType end_hour,  // 24 hour
-                       DateTime::MinuteType start_minute = 0,
-                       DateTime::MinuteType end_minute = 0,
-                       DateTime::SecondType start_second = 0,
-                       DateTime::SecondType end_second = 0,
-                       DateTime::MillisecondType start_msec = 0,
-                       DateTime::MillisecondType end_msec = 0) const;
-        
+ +
template<typename ... Ts>
+DataFrame<DateTime, H>
+get_data_between_times(DateTime::HourType start_hour,  // 24 hour
+                       DateTime::HourType end_hour,  // 24 hour
+                       DateTime::MinuteType start_minute = 0,
+                       DateTime::MinuteType end_minute = 0,
+                       DateTime::SecondType start_second = 0,
+                       DateTime::SecondType end_second = 0,
+                       DateTime::MillisecondType start_msec = 0,
+                       DateTime::MillisecondType end_msec = 0) const;
+
This selects the rows using the index column that happen between the specified start and end time. It returns another DataFrame with selected data indexed by DateTime. The specified start/end times are excluded. Self is unchanged.

@@ -75,19 +74,18 @@ - -

-template<typename ... Ts>
-PtrView
-get_view_between_times(DateTime::HourType start_hour,  // 24 hour
-                       DateTime::HourType end_hour,  // 24 hour
-                       DateTime::MinuteType start_minute = 0,
-                       DateTime::MinuteType end_minute = 0,
-                       DateTime::SecondType start_second = 0,
-                       DateTime::SecondType end_second = 0,
-                       DateTime::MillisecondType start_msec = 0,
-                       DateTime::MillisecondType end_msec = 0);
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_between_times(DateTime::HourType start_hour,  // 24 hour
+                       DateTime::HourType end_hour,  // 24 hour
+                       DateTime::MinuteType start_minute = 0,
+                       DateTime::MinuteType end_minute = 0,
+                       DateTime::SecondType start_second = 0,
+                       DateTime::SecondType end_second = 0,
+                       DateTime::MillisecondType start_msec = 0,
+                       DateTime::MillisecondType end_msec = 0);
+
It behaves like get_data_between_times(), but it returns a View. A view is a DataFrame that is a reference to the original DataFrame. So if you modify anything in the view the original DataFrame will also be modified.

@@ -107,19 +105,18 @@ - -

-template<typename ... Ts>
-ConstPtrView
-get_view_between_times(DateTime::HourType start_hour,  // 24 hour
-                       DateTime::HourType end_hour,  // 24 hour
-                       DateTime::MinuteType start_minute = 0,
-                       DateTime::MinuteType end_minute = 0,
-                       DateTime::SecondType start_second = 0,
-                       DateTime::SecondType end_second = 0,
-                       DateTime::MillisecondType start_msec = 0,
-                       DateTime::MillisecondType end_msec = 0) const;
-        
+ +
template<typename ... Ts>
+ConstPtrView
+get_view_between_times(DateTime::HourType start_hour,  // 24 hour
+                       DateTime::HourType end_hour,  // 24 hour
+                       DateTime::MinuteType start_minute = 0,
+                       DateTime::MinuteType end_minute = 0,
+                       DateTime::SecondType start_second = 0,
+                       DateTime::SecondType end_second = 0,
+                       DateTime::MillisecondType start_msec = 0,
+                       DateTime::MillisecondType end_msec = 0) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_by_affin.html b/docs/HTML/get_data_by_affin.html index e940d45a..d7c34ead 100644 --- a/docs/HTML/get_data_by_affin.html +++ b/docs/HTML/get_data_by_affin.html @@ -43,18 +43,17 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<DataFrame>
-get_data_by_affin(const char *col_name,
-                  std::function<double(const T &x, const T &y)> &&dfunc =
-                      [](const T &x, const T &y) -> double  {
-                          return ((x - y) * (x - y));
-                      },
-                  size_type num_of_iter = 20,
-                  double damping_factor = 0.9) const;
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<DataFrame>
+get_data_by_affin(const char *col_name,
+                  std::function<double(const T &x, const T &y)> &&dfunc =
+                      [](const T &x, const T &y) -> double  {
+                          return ((x - y) * (x - y));
+                      },
+                  size_type num_of_iter = 20,
+                  double damping_factor = 0.9) const;
+
This uses Affinity Propagation algorithm to divide the named column into clusters. It returns an array of DataFrame's each containing one of the clusters of data based on the named column. Unlike K-Means clustering, you do not have to specify the number of clusters.
@@ -77,18 +76,17 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<PtrView>
-get_view_by_affin(const char *col_name,
-                  std::function<double(const T &x, const T &y)> &&dfunc =
-                      [](const T &x, const T &y) -> double  {
-                          return ((x - y) * (x - y));
-                      },
-                  size_type num_of_iter = 20,
-                  double damping_factor = 0.9);
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<PtrView>
+get_view_by_affin(const char *col_name,
+                  std::function<double(const T &x, const T &y)> &&dfunc =
+                      [](const T &x, const T &y) -> double  {
+                          return ((x - y) * (x - y));
+                      },
+                  size_type num_of_iter = 20,
+                  double damping_factor = 0.9);
+
This is identical to above get_data_by_affin(), but:
@@ -110,18 +108,17 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<ConstPtrView>
-get_view_by_affin(const char *col_name,
-                  std::function<double(const T &x, const T &y)> &&dfunc =
-                      [](const T &x, const T &y) -> double  {
-                          return ((x - y) * (x - y));
-                      },
-                  size_type num_of_iter = 20,
-                  double damping_factor = 0.9) const;
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<ConstPtrView>
+get_view_by_affin(const char *col_name,
+                  std::function<double(const T &x, const T &y)> &&dfunc =
+                      [](const T &x, const T &y) -> double  {
+                          return ((x - y) * (x - y));
+                      },
+                  size_type num_of_iter = 20,
+                  double damping_factor = 0.9) const;
+
Same as above view, but it returns a std::vector of const views. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_by_dbscan.html b/docs/HTML/get_data_by_dbscan.html index c4939309..040364bf 100644 --- a/docs/HTML/get_data_by_dbscan.html +++ b/docs/HTML/get_data_by_dbscan.html @@ -43,19 +43,17 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<DataFrame>
-get_data_by_dbscan(const char *col_name,
-                   long min_members,
-                   double max_distance,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       }) const;
-
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<DataFrame>
+get_data_by_dbscan(const char *col_name,
+                   long min_members,
+                   double max_distance,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       }) const;
+
This uses DBSCAN algorithm to divide the named column into clusters. It returns an array of DataFrame's each containing one of the clusters of data based on the named column. The last DataFrame in the array contains noisy data. It contains datapoints that could not be placed into any cluster. Ideally, you want the last DataFrame to be empty. Unlike K-Means clustering, you do not have to specify the number of clusters.
@@ -76,18 +74,18 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<PtrView>
-get_view_by_dbscan(const char *col_name,
-                   long min_members,
-                   double max_distance,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       });
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<PtrView>
+get_view_by_dbscan(const char *col_name,
+                   long min_members,
+                   double max_distance,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       });
+
+
This is identical to above get_data_by_dbscan(), but:
@@ -109,18 +107,17 @@ - -

-template<arithmetic T, typename ... Ts>
-std::vector<ConstPtrView>
-get_view_by_dbscan(const char *col_name,
-                   long min_members,
-                   double max_distance,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       }) const;
-        
+ +
template<arithmetic T, typename ... Ts>
+std::vector<ConstPtrView>
+get_view_by_dbscan(const char *col_name,
+                   long min_members,
+                   double max_distance,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       }) const;
+
Same as above view, but it returns a std::vector of const views. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_by_idx.html b/docs/HTML/get_data_by_idx.html index 81ec2b22..c3528f34 100644 --- a/docs/HTML/get_data_by_idx.html +++ b/docs/HTML/get_data_by_idx.html @@ -42,12 +42,11 @@ Signature Description Parameters - -

-template<typename ... Ts>
-DataFrame
-get_data_by_idx(Index2D<IndexType> range) const;
-        
+ +
template<typename ... Ts>
+DataFrame
+get_data_by_idx(Index2D<IndexType> range) const;
+
It returns a DataFrame (including the index and data columns) containing the data from index begin to index end. This function assumes the DataFrame is consistent and sorted by index. The behavior is undefined otherwise. @@ -59,12 +58,11 @@ - -

-template<typename ... Ts>
-DataFrame
-get_data_by_idx(const std::vector<IndexType> &values) const;
-        
+ +
template<typename ... Ts>
+DataFrame
+get_data_by_idx(const std::vector<IndexType> &values) const;
+
It returns a DataFrame (including the index and data columns) containing the data corresponding to the indices specified in "values" vector.
@@ -78,12 +76,11 @@ - -

-template<typename ... Ts>
-View
-get_view_by_idx(Index2D<IndexType> range);
-        
+ +
template<typename ... Ts>
+View
+get_view_by_idx(Index2D<IndexType> range);
+
It behaves like get_data_by_idx(range), but it returns a View.
@@ -98,12 +95,11 @@ - -

-template<typename ... Ts>
-PtrView
-get_view_by_idx(const std::vector<IndexType> &values);
-        
+ +
template<typename ... Ts>
+PtrView
+get_view_by_idx(const std::vector<IndexType> &values);
+
It behaves like get_data_by_idx(values), but it returns a PtrView.
@@ -117,12 +113,11 @@ - -

-template<typename ... Ts>
-ConstView
-get_view_by_idx(Index2D<IndexType> range) const;
-        
+ +
template<typename ... Ts>
+ConstView
+get_view_by_idx(Index2D<IndexType> range) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. @@ -134,12 +129,11 @@ - -

-template<typename ... Ts>
-ConstPtrView
-get_view_by_idx(const std::vector<IndexType> &values) const;
-        
+ +
template<typename ... Ts>
+ConstPtrView
+get_view_by_idx(const std::vector<IndexType> &values) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_by_kmeans.html b/docs/HTML/get_data_by_kmeans.html index 39b489fe..2b27d629 100644 --- a/docs/HTML/get_data_by_kmeans.html +++ b/docs/HTML/get_data_by_kmeans.html @@ -43,18 +43,17 @@ - -

-template<std::size_t K, arithmetic T, typename ... Ts>
-std::array<DataFrame, K>
-get_data_by_kmeans(const char *col_name,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       },
-                   size_type num_of_iter = 1000,
-                   seed_t seed = seed_t(-1)) const;
-        
+ +
template<std::size_t K, arithmetic T, typename ... Ts>
+std::array<DataFrame, K>
+get_data_by_kmeans(const char *col_name,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       },
+                   size_type num_of_iter = 1000,
+                   seed_t seed = seed_t(-1)) const;
+
This uses k-means clustering algorithm to divide the named column into K clusters. It returns a std::array of K DataFrame's each containing one of the clusters of data based on the named column.
@@ -75,18 +74,17 @@ - -

-template<std::size_t K, arithmetic T, typename ... Ts>
-std::array<PtrView, K>
-get_view_by_kmeans(const char *col_name,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       },
-                   size_type num_of_iter = 1000,
-                   seed_t seed = seed_t(-1));
-        
+ +
template<std::size_t K, arithmetic T, typename ... Ts>
+std::array<PtrView, K>
+get_view_by_kmeans(const char *col_name,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       },
+                   size_type num_of_iter = 1000,
+                   seed_t seed = seed_t(-1));
+
This is identical to above get_data_by_kmeans(), but:
@@ -109,18 +107,17 @@ - -

-template<std::size_t K, arithmetic T, typename ... Ts>
-std::array<ConstPtrView, K>
-get_view_by_kmeans(const char *col_name,
-                   std::function<double(const T &x, const T &y)> &&dfunc =
-                       [](const T &x, const T &y) -> double  {
-                           return ((x - y) * (x - y));
-                       },
-                   size_type num_of_iter = 1000,
-                   seed_t seed = seed_t(-1)) const;
-        
+ +
template<std::size_t K, arithmetic T, typename ... Ts>
+std::array<ConstPtrView, K>
+get_view_by_kmeans(const char *col_name,
+                   std::function<double(const T &x, const T &y)> &&dfunc =
+                       [](const T &x, const T &y) -> double  {
+                           return ((x - y) * (x - y));
+                       },
+                   size_type num_of_iter = 1000,
+                   seed_t seed = seed_t(-1)) const;
+
Same as above view, but it returns a std::array of K const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_data_by_like.html b/docs/HTML/get_data_by_like.html index b612af37..ab405460 100644 --- a/docs/HTML/get_data_by_like.html +++ b/docs/HTML/get_data_by_like.html @@ -43,15 +43,14 @@ - -

-template<StringOnly T, typename ... Ts>
-DataFrame
-get_data_by_like(const char *name,
-                 const char *pattern,
-                 bool case_insensitive = false,
-                 char esc_char = '\\') const;
-        
+ +
template<StringOnly T, typename ... Ts>
+DataFrame
+get_data_by_like(const char *name,
+                 const char *pattern,
+                 bool case_insensitive = false,
+                 char esc_char = '\\') const;
+
This method does a basic Glob-like pattern matching (also similar to SQL like clause) to filter data in the named column. It returns a new DataFrame. Each element of the named column is checked against a Glob-like matching logic

@@ -79,15 +78,14 @@ - -

-template<StringOnly T, typename ... Ts>
-PtrView
-get_view_by_like(const char *name,
-                 const char *pattern,
-                 bool case_insensitive = false,
-                 char esc_char = '\\');
-        
+ +
template<StringOnly T, typename ... Ts>
+PtrView
+get_view_by_like(const char *name,
+                 const char *pattern,
+                 bool case_insensitive = false,
+                 char esc_char = '\\');
+
This is identical with above get_data_by_like(), but:
@@ -109,15 +107,14 @@ - -

-template<StringOnly T, typename ... Ts>
-ConstPtrView
-get_view_by_like(const char *name,
-                 const char *pattern,
-                 bool case_insensitive = false,
-                 char esc_char = '\\') const;
-        
+ +
template<StringOnly T, typename ... Ts>
+ConstPtrView
+get_view_by_like(const char *name,
+                 const char *pattern,
+                 bool case_insensitive = false,
+                 char esc_char = '\\') const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. @@ -133,17 +130,16 @@ - -

-template<StringOnly T, typename ... Ts>
-DataFrame
-get_data_by_like(const char *name1,
-                 const char *name2,
-                 const char *pattern1,
-                 const char *pattern2,
-                 bool case_insensitive = false,
-                 char esc_char = '\\') const;
-        
+ +
template<StringOnly T, typename ... Ts>
+DataFrame
+get_data_by_like(const char *name1,
+                 const char *name2,
+                 const char *pattern1,
+                 const char *pattern2,
+                 bool case_insensitive = false,
+                 char esc_char = '\\') const;
+
This does the same function as above get_data_by_like() but operating on two columns.
@@ -161,17 +157,16 @@ - -

-template<StringOnly T, typename ... Ts>
-PtrView
-get_view_by_like(const char *name1,
-                 const char *name2,
-                 const char *pattern1,
-                 const char *pattern2,
-                 bool case_insensitive = false,
-                 char esc_char = '\\');
-        
+ +
template<StringOnly T, typename ... Ts>
+PtrView
+get_view_by_like(const char *name1,
+                 const char *name2,
+                 const char *pattern1,
+                 const char *pattern2,
+                 bool case_insensitive = false,
+                 char esc_char = '\\');
+
This is identical with above get_data_by_like(), but:
@@ -194,17 +189,16 @@ - -

-template<StringOnly T, typename ... Ts>
-ConstPtrView
-get_view_by_like(const char *name1,
-                 const char *name2,
-                 const char *pattern1,
-                 const char *pattern2,
-                 bool case_insensitive = false,
-                 char esc_char = '\\') const;
-        
+ +
template<StringOnly T, typename ... Ts>
+ConstPtrView
+get_view_by_like(const char *name1,
+                 const char *name2,
+                 const char *pattern1,
+                 const char *pattern2,
+                 bool case_insensitive = false,
+                 char esc_char = '\\') const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. diff --git a/docs/HTML/get_top_n_data.html b/docs/HTML/get_top_n_data.html index 3846e593..20120937 100644 --- a/docs/HTML/get_top_n_data.html +++ b/docs/HTML/get_top_n_data.html @@ -43,12 +43,11 @@ - -

-template<comparable T, typename ... Ts>
-DataFrame
-get_top_n_data(const char *col_name, size_type n) const;
-        
+ +
template<comparable T, typename ... Ts>
+DataFrame
+get_top_n_data(const char *col_name, size_type n) const;
+
This returns a new DataFrame with the n top rows of the given column. The returned DataFrame rows will be in the same order as self.

@@ -64,12 +63,11 @@ - -

-template<comparable T, typename ... Ts>
-PtrView
-get_top_n_view(const char *col_name, size_type n);
-        
+ +
template<comparable T, typename ... Ts>
+PtrView
+get_top_n_view(const char *col_name, size_type n);
+
This is identical with above get_top_n_data(), but:
@@ -89,12 +87,11 @@ - -

-template<comparable T, typename ... Ts>
-ConstPtrView
-get_top_n_view(const char *col_name, size_type n) const;
-        
+ +
template<comparable T, typename ... Ts>
+ConstPtrView
+get_top_n_view(const char *col_name, size_type n) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view. @@ -109,12 +106,11 @@ - -

-template<comparable T, typename ... Ts>
-DataFrame
-get_bottom_n_data(const char *col_name, size_type n) const;
-        
+ +
template<comparable T, typename ... Ts>
+DataFrame
+get_bottom_n_data(const char *col_name, size_type n) const;
+
This returns a new DataFrame with the n bottom rows of the given column. The returned DataFrame rows will be in the same order as self.

@@ -130,12 +126,11 @@ - -

-template<comparable T, typename ... Ts>
-PtrView
-get_bottom_n_view(const char *col_name, size_type n);
-        
+ +
template<comparable T, typename ... Ts>
+PtrView
+get_bottom_n_view(const char *col_name, size_type n);
+
This is identical with above get_bottom_n_data(), but:
@@ -155,12 +150,11 @@ - -

-template<comparable T, typename ... Ts>
-ConstPtrView
-get_bottom_n_view(const char *col_name, size_type n) const;
-        
+ +
template<comparable T, typename ... Ts>
+ConstPtrView
+get_bottom_n_view(const char *col_name, size_type n) const;
+
Same as above view, but it returns a const view. You can not change data in const views. But if the data is changed in the original DataFrame or through another view, it is reflected in the const view.