📄 state.h
字号:
#ifndef STATE_H#define STATE_H#include <vector>#include <string>using namespace std;/** * The state class. **/class State{ protected: vector<int> m_vars; struct timeval timestamp; public: State() {}; // Creates a state from a vector of state variables. State(vector<int> vars); // Returns the state vector. vector<int> get(void) const {return m_vars;} // Returns the value of the state variable with index 'index'. int getVar(int index) const; // Prints the state to standard output. void print() const; // Prints the state to a string. void print(string &str) const; // Returns the size of a state int size() {return (int) m_vars.size();}};#endif/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg * Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -