XACC
expression_parsing_util.hpp
1 /*******************************************************************************
2  * Copyright (c) 2019 UT-Battelle, LLC.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and Eclipse Distribution License v1.0 which accompanies this
6  * distribution. The Eclipse Public License is available at
7  * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
8  *License is available at https://eclipse.org/org/documents/edl-v10.php
9  *
10  * Contributors:
11  * Alexander J. McCaskey - initial API and implementation
12  *******************************************************************************/
13 #ifndef XACC_EXPR_PARSING_HPP_
14 #define XACC_EXPR_PARSING_HPP_
15 
16 #include <string>
17 #include <vector>
18 
19 #include "Identifiable.hpp"
20 
21 namespace xacc {
23 public:
24  virtual bool validExpression(const std::string expr,
25  const std::vector<std::string> variables) = 0;
26  virtual bool isConstant(const std::string expr, double &ref) = 0;
27  virtual bool evaluate(const std::string expr,
28  const std::vector<std::string> variables,
29  const std::vector<double> variableValues,
30  double &ref) = 0;
31 };
32 } // namespace xacc
33 #endif
Definition: Accelerator.hpp:25
Definition: Identifiable.hpp:25
Definition: expression_parsing_util.hpp:22