Gazebo Math

API Reference

6.15.1
gz/math/Vector3Stats.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Open Source Robotics Foundation
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  *
16 */
17 #ifndef GZ_MATH_VECTOR3STATS_HH_
18 #define GZ_MATH_VECTOR3STATS_HH_
19 
20 #include <string>
21 #include <gz/math/Helpers.hh>
22 #include <gz/math/SignalStats.hh>
23 #include <gz/math/Vector3.hh>
24 #include <gz/math/config.hh>
25 
26 namespace ignition
27 {
28  namespace math
29  {
30  // Inline bracket to help doxygen filtering.
31  inline namespace IGNITION_MATH_VERSION_NAMESPACE {
32  //
34  class Vector3StatsPrivate;
35 
38  class IGNITION_MATH_VISIBLE Vector3Stats
39  {
41  public: Vector3Stats();
42 
44  public: ~Vector3Stats();
45 
48  public: void InsertData(const Vector3d &_data);
49 
59  public: bool InsertStatistic(const std::string &_name);
60 
68  public: bool InsertStatistics(const std::string &_names);
69 
71  public: void Reset();
72 
75  public: const SignalStats &X() const;
76 
79  public: const SignalStats &Y() const;
80 
83  public: const SignalStats &Z() const;
84 
87  public: const SignalStats &Mag() const;
88 
91  public: SignalStats &X();
92 
95  public: SignalStats &Y();
96 
99  public: SignalStats &Z();
100 
103  public: SignalStats &Mag();
104 
106  protected: Vector3StatsPrivate *dataPtr;
107  };
108  }
109  }
110 }
111 #endif
112 
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
STL class.
const SignalStats & Z() const
Get statistics for z component of signal.
bool InsertStatistics(const std::string &_names)
Add multiple statistics.
void InsertData(const Vector3d &_data)
Add a new sample to the statistical measures.
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: gz/math/Vector3.hh:41
Collection of statistics for a scalar signal.
Definition: gz/math/SignalStats.hh:182
const SignalStats & Mag() const
Get statistics for magnitude component of signal.
void Reset()
Forget all previous data.
bool InsertStatistic(const std::string &_name)
Add a new type of statistic.
const SignalStats & X() const
Get statistics for x component of signal.
Vector3StatsPrivate * dataPtr
Pointer to private data.
Definition: gz/math/Vector3Stats.hh:106
Collection of statistics for a Vector3 signal.
Definition: gz/math/Vector3Stats.hh:38
const SignalStats & Y() const
Get statistics for y component of signal.