3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

Z3 sources

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-02 11:35:25 -07:00
parent 3f9edad676
commit e9eab22e5c
1186 changed files with 381859 additions and 0 deletions

45
lib/statistics.h Normal file
View file

@ -0,0 +1,45 @@
/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
statistics.h
Abstract:
Wrapper for reporting statistics
Author:
Leonardo (leonardo) 2011-05-17
Notes:
--*/
#ifndef _STATISTICS_H_
#define _STATISTICS_H_
#include<iostream>
#include"vector.h"
class statistics {
typedef std::pair<char const *, unsigned> key_val_pair;
svector<key_val_pair> m_stats;
typedef std::pair<char const *, double> key_d_val_pair;
svector<key_d_val_pair> m_d_stats;
public:
void copy(statistics const & st);
void reset();
void update(char const * key, unsigned inc);
void update(char const * key, double inc);
void display(std::ostream & out) const;
void display_smt2(std::ostream & out) const;
void display_internal(std::ostream & out) const;
unsigned size() const;
bool is_uint(unsigned idx) const;
char const * get_key(unsigned idx) const;
unsigned get_uint_value(unsigned idx) const;
double get_double_value(unsigned idx) const;
};
#endif