Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
benchmark
src
benchmark/src/complexity.h
Go to the documentation of this file.
1
// Copyright 2016 Ismael Jimenez Martinez. All rights reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
// Source project : https://github.com/ismaelJimenez/cpp.leastsq
16
// Adapted to be used with google benchmark
17
18
#ifndef COMPLEXITY_H_
19
#define COMPLEXITY_H_
20
21
#include <string>
22
#include <vector>
23
24
#include "benchmark/benchmark.h"
25
26
namespace
benchmark
{
27
28
// Return a vector containing the bigO and RMS information for the specified
29
// list of reports. If 'reports.size() < 2' an empty vector is returned.
30
std::vector<BenchmarkReporter::Run>
ComputeBigO
(
31
const
std::vector<BenchmarkReporter::Run>& reports);
32
33
// This data structure will contain the result returned by MinimalLeastSq
34
// - coef : Estimated coeficient for the high-order term as
35
// interpolated from data.
36
// - rms : Normalized Root Mean Squared Error.
37
// - complexity : Scalability form (e.g. oN, oNLogN). In case a scalability
38
// form has been provided to MinimalLeastSq this will return
39
// the same value. In case BigO::oAuto has been selected, this
40
// parameter will return the best fitting curve detected.
41
42
struct
LeastSq
{
43
LeastSq
() :
coef
(0.0),
rms
(0.0),
complexity
(
oNone
) {}
44
45
double
coef
;
46
double
rms
;
47
BigO
complexity
;
48
};
49
50
// Function to return an string for the calculated complexity
51
std::string
GetBigOString
(
BigO
complexity);
52
53
}
// end namespace benchmark
54
55
#endif // COMPLEXITY_H_
benchmark::oNone
@ oNone
Definition:
benchmark/include/benchmark/benchmark.h:449
benchmark
Definition:
bm_alarm.cc:55
testing::internal::string
::std::string string
Definition:
bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
benchmark::LeastSq
Definition:
benchmark/src/complexity.h:42
benchmark::LeastSq::coef
double coef
Definition:
benchmark/src/complexity.h:45
benchmark::ComputeBigO
std::vector< BenchmarkReporter::Run > ComputeBigO(const std::vector< BenchmarkReporter::Run > &reports)
Definition:
benchmark/src/complexity.cc:156
benchmark::GetBigOString
std::string GetBigOString(BigO complexity)
Definition:
benchmark/src/complexity.cc:53
benchmark::LeastSq::LeastSq
LeastSq()
Definition:
benchmark/src/complexity.h:43
benchmark::BigO
BigO
Definition:
benchmark/include/benchmark/benchmark.h:449
benchmark::LeastSq::complexity
BigO complexity
Definition:
benchmark/src/complexity.h:47
benchmark::LeastSq::rms
double rms
Definition:
benchmark/src/complexity.h:46
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:52