XACC
exprtk_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_EXPRTK_EXPR_PARSING_HPP_
14 #define XACC_EXPRTK_EXPR_PARSING_HPP_
15 
16 #include "expression_parsing_util.hpp"
17 
18 namespace xacc {
20 public:
21  ExprtkExpressionParsingUtil() = default;
22  bool validExpression(const std::string expr,
23  const std::vector<std::string> variables) override;
24  bool isConstant(const std::string expr, double &ref) override;
25  bool evaluate(const std::string expr,
26  const std::vector<std::string> variables,
27  const std::vector<double> variableValues, double &ref) override;
28  const std::string name() const override { return "exprtk"; }
29  const std::string description() const override { return ""; }
30 };
31 } // namespace xacc
32 #endif
Definition: Accelerator.hpp:25
const std::string description() const override
Definition: exprtk_parsing_util.hpp:29
const std::string name() const override
Definition: exprtk_parsing_util.hpp:28
Definition: exprtk_parsing_util.hpp:19
Definition: expression_parsing_util.hpp:22