Mantid
Loading...
Searching...
No Matches
FunctionDomain1DVector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8
12
13#include <boost/python/class.hpp>
14#include <boost/python/make_constructor.hpp>
15#include <boost/python/module.hpp>
16
19using namespace Mantid::PythonInterface;
21using namespace boost::python;
22
24
26 if (NDArray::check(xvalues)) {
28 } else {
30 }
31}
32
34
35 class_<FunctionDomain1DVector, bases<FunctionDomain1D>, boost::noncopyable>("FunctionDomain1DVector", no_init)
36 .def("__init__", make_constructor(&createFunctionDomain1DVector, default_call_policies(), (arg("xvalues"))));
37}
void export_FunctionDomain1DVector()
FunctionDomain1DVector * createFunctionDomain1DVector(const boost::python::object &xvalues)
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
Implements FunctionDomain1D with its own storage in form of a std::vector.
Represent a domain for functions of one real argument.
Thin object wrapper around a numpy array.
Definition: NDArray.h:31
static bool check(const boost::python::object &obj)
Check if a python object points to an array type object.
Definition: NDArray.cpp:49
Definition: NDArray.h:49
Converter taking an input numpy array and converting it to a std::vector.
Converts a Python sequence type to a C++ std::vector, where the element type is defined by the templa...