cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
plot_options.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2025 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
21
23
24namespace stat_bench {
25
27 : log_parameter_(false), log_output_(false) {}
28
30 : log_parameter_(
32 log_output_((option & PlotOption::log_output) == PlotOption::log_output) {
33}
34
35auto PlotOptions::log_parameter(bool value) noexcept -> PlotOptions& {
36 log_parameter_ = value;
37 return *this;
38}
39
40auto PlotOptions::log_output(bool value) noexcept -> PlotOptions& {
41 log_output_ = value;
42 return *this;
43}
44
46 const util::StringView& value) noexcept -> PlotOptions& {
47 subplot_column_parameter_name_ = value;
48 return *this;
49}
50
52 const util::StringView& value) noexcept -> PlotOptions& {
53 subplot_row_parameter_name_ = value;
54 return *this;
55}
56
57auto PlotOptions::log_parameter() const noexcept -> bool {
58 return log_parameter_;
59}
60
61auto PlotOptions::log_output() const noexcept -> bool { return log_output_; }
62
64 -> util::StringView {
65 return subplot_column_parameter_name_;
66}
67
69 -> util::StringView {
70 return subplot_row_parameter_name_;
71}
72
73} // namespace stat_bench
static constexpr Value log_parameter
Plot parameters in the log scale.
Definition plot_option.h:39
static constexpr Value log_output
Plot custom outputs in the log scale.
Definition plot_option.h:42
unsigned Value
Type of values.
Definition plot_option.h:33
PlotOptions() noexcept
Constructor.
auto subplot_row_parameter_name() const noexcept -> util::StringView
Get parameter name used for rows of subplots.
auto log_parameter() const noexcept -> bool
Get whether to plot parameters in the log scale.
auto subplot_column_parameter_name() const noexcept -> util::StringView
Get parameter name used for columns of subplots.
auto log_output() const noexcept -> bool
Get whether to plot custom outputs in the log scale.
Class of view of strings.
Definition string_view.h:34
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
Definition of PlotOption enumeration.
Definition of PlotOptions class.