Main Page
Namespaces
Classes
Files
File List
File Members
include
wiimote
stat_vector_3d.h
Go to the documentation of this file.
1
/*
2
* Three dimensional statistic vector for use with the
3
* for ROS Node which interfaces with a wiimote control unit.
4
* Copyright (c) 2016, Intel Corporation.
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms and conditions of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*/
15
16
/*
17
* Initial C++ implementation by
18
* Mark Horn <mark.d.horn@intel.com>
19
*
20
* Revisions:
21
*
22
*/
23
24
#pragma once
25
#ifndef WIIMOTE_STAT_VECTOR_3D_H
26
#define WIIMOTE_STAT_VECTOR_3D_H
27
28
#include <vector>
29
#include <numeric>
30
#include <algorithm>
31
#include <math.h>
32
33
// The vector of 3 values collected to generate:
34
// mean, standard deviation, and variance.
35
36
typedef
std::vector<double>
TVectorDouble
;
37
38
class
StatVector3d
39
{
40
public
:
41
StatVector3d
();
42
StatVector3d
(
int
x,
int
y,
int
z
);
43
44
void
clear
();
45
46
int
size
();
47
void
addData
(
int
x,
int
y,
int
z);
48
49
TVectorDouble
getMeanRaw
();
50
TVectorDouble
getMeanScaled
(
double
scale);
51
TVectorDouble
getVarianceRaw
();
52
TVectorDouble
getVarianceScaled
(
double
scale);
53
TVectorDouble
getStandardDeviationRaw
();
54
TVectorDouble
getStandardDeviationScaled
(
double
scale);
55
56
private
:
57
int
count_
;
58
std::vector<int>
x_
;
59
std::vector<int>
y_
;
60
std::vector<int>
z_
;
61
};
62
63
#endif // WIIMOTE_STAT_VECTOR_3D_H
StatVector3d::addData
void addData(int x, int y, int z)
Definition:
stat_vector_3d.cpp:60
StatVector3d::getStandardDeviationRaw
TVectorDouble getStandardDeviationRaw()
Definition:
stat_vector_3d.cpp:154
StatVector3d::getMeanScaled
TVectorDouble getMeanScaled(double scale)
Definition:
stat_vector_3d.cpp:93
StatVector3d::getVarianceRaw
TVectorDouble getVarianceRaw()
Definition:
stat_vector_3d.cpp:103
StatVector3d::clear
void clear()
Definition:
stat_vector_3d.cpp:46
StatVector3d::x_
std::vector< int > x_
Definition:
stat_vector_3d.h:58
StatVector3d
Definition:
stat_vector_3d.h:38
StatVector3d::size
int size()
Definition:
stat_vector_3d.cpp:55
StatVector3d::y_
std::vector< int > y_
Definition:
stat_vector_3d.h:59
StatVector3d::z_
std::vector< int > z_
Definition:
stat_vector_3d.h:60
StatVector3d::getMeanRaw
TVectorDouble getMeanRaw()
Definition:
stat_vector_3d.cpp:69
StatVector3d::getVarianceScaled
TVectorDouble getVarianceScaled(double scale)
Definition:
stat_vector_3d.cpp:144
StatVector3d::count_
int count_
Definition:
stat_vector_3d.h:57
StatVector3d::StatVector3d
StatVector3d()
Definition:
stat_vector_3d.cpp:34
wiimote.stats.z
z
Definition:
stats.py:1918
StatVector3d::getStandardDeviationScaled
TVectorDouble getStandardDeviationScaled(double scale)
Definition:
stat_vector_3d.cpp:167
TVectorDouble
std::vector< double > TVectorDouble
Definition:
stat_vector_3d.h:36
wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Mon Jun 10 2019 13:42:43