QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
Statistics.h
Go to the documentation of this file.
1/******************************************************************************
2 * Project: libspatialindex - A C++ library for spatial indexing
3 * Author: Marios Hadjieleftheriou, [email protected]
4 ******************************************************************************
5 * Copyright (c) 2002, Marios Hadjieleftheriou
6 *
7 * All rights reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
26******************************************************************************/
27
28#pragma once
29
30namespace SpatialIndex
31{
32 namespace MVRTree
33 {
34 class MVRTree;
35 class Node;
36 class Leaf;
37 class Index;
38
40 {
41 public:
44 virtual ~Statistics();
46
47 //
48 // IStatistics interface
49 //
50 virtual uint64_t getReads() const;
51 virtual uint64_t getWrites() const;
52 virtual uint32_t getNumberOfNodes() const;
53 virtual uint64_t getNumberOfData() const;
54
55 virtual uint64_t getSplits() const;
56 virtual uint64_t getHits() const;
57 virtual uint64_t getMisses() const;
58 virtual uint64_t getAdjustments() const;
59 virtual uint64_t getQueryResults() const;
60 virtual uint32_t getTreeHeight() const;
61 virtual uint32_t getNumberOfNodesInLevel(uint32_t l) const;
62
63 private:
64 void reset();
65
66 uint64_t m_u64Reads;
67
68 uint64_t m_u64Writes;
69
70 uint64_t m_u64Splits;
71
72 uint64_t m_u64Hits;
73
74 uint64_t m_u64Misses;
75
76 uint32_t m_u32Nodes;
77
79
81
83
85
86 uint64_t m_u64Data;
87
89
90 std::vector<uint32_t> m_treeHeight;
91
92 std::vector<uint32_t> m_nodesInLevel;
93
94 friend class MVRTree;
95 friend class Node;
96 friend class Index;
97 friend class Leaf;
98
99 friend std::ostream& operator<<(std::ostream& os, const Statistics& s);
100 }; // Statistics
101
102 std::ostream& operator<<(std::ostream& os, const Statistics& s);
103 }
104}
105
Definition Index.h:34
Definition SpatialIndex.h:182
Definition Index.h:35
Definition Leaf.h:35
Definition MVRTree.h:39
Definition Node.h:42
Definition Statistics.h:40
uint64_t m_u64Splits
Definition Statistics.h:70
virtual uint64_t getAdjustments() const
uint32_t m_u32Nodes
Definition Statistics.h:76
virtual uint64_t getQueryResults() const
virtual uint32_t getNumberOfNodes() const
virtual uint64_t getSplits() const
virtual uint64_t getHits() const
virtual uint32_t getTreeHeight() const
uint64_t m_u64Hits
Definition Statistics.h:72
uint32_t m_u32DeadLeafNodes
Definition Statistics.h:80
uint64_t m_u64Misses
Definition Statistics.h:74
virtual uint64_t getMisses() const
std::vector< uint32_t > m_nodesInLevel
Definition Statistics.h:92
uint64_t m_u64Data
Definition Statistics.h:86
uint64_t m_u64QueryResults
Definition Statistics.h:84
virtual uint64_t getWrites() const
Statistics & operator=(const Statistics &)
uint64_t m_u64Reads
Definition Statistics.h:66
friend std::ostream & operator<<(std::ostream &os, const Statistics &s)
virtual uint64_t getReads() const
virtual uint64_t getNumberOfData() const
uint32_t m_u32DeadIndexNodes
Definition Statistics.h:78
Statistics(const Statistics &)
uint64_t m_u64Writes
Definition Statistics.h:68
std::vector< uint32_t > m_treeHeight
Definition Statistics.h:90
uint64_t m_u64Adjustments
Definition Statistics.h:82
virtual uint32_t getNumberOfNodesInLevel(uint32_t l) const
uint64_t m_u64TotalData
Definition Statistics.h:88
std::ostream & operator<<(std::ostream &os, const MVRTree &t)
Definition CustomStorage.h:34
char s
Definition opennurbs_string.cpp:32