14 # pragma warning(disable:4231)
17 # pragma warning(disable:4251)
20 # pragma warning(disable:4275)
23 # pragma warning(disable:4800)
28 #include <boost/python.hpp>
31 using namespace boost::python;
42 class_ < PyNTuple, bases < NTuple > >
44 "A derived class of DataSource that stores its tabular data vectors of\n"
45 "double precision numbers in C++. An NTuple object can be created in\n"
46 "a number of ways including reading from a file using the\n"
49 (
"NTuple ( None ) -> NTuple\n"
50 "NTuple ( value ) -> NTuple\n"
51 "NTuple ( sequence ) -> NTuple\n"
52 "NTuple ( NTuple ) -> NTuple\n"
54 "The form with no arguments creates an empty NTuple with no rows\n"
55 "or columns. The form with one value argument creates an empty\n"
56 "NTuple with `value' number of columns. The form with a sequence\n"
57 "argument creates an empty NTuple with the number of columns equal\n"
58 "to size of the sequence. The sequence should contain string which\n"
59 "are used as the column labels. The last form form creates an\n"
60 "NTuple\n whose contents is a copy of an existing one." ) )
62 .def ( init < unsigned int > ( ) )
64 .def ( init <
const std::vector < std::string > & > ( ) )
66 .def ( init < const PyNTuple & > () )
68 .def (
"setTitle", &PyNTuple::setTitle,
69 "setTitle ( string ) -> None\n"
71 "Sets the title of the ntuple. The title by default appears at\n"
72 "the top of a Display." )
85 (
const std::string &,
86 const std::vector < double > & ) )
88 "addColumn ( label, sequence<double> ) -> index\n"
90 "Adds a new column with label." )
92 .def (
"append", &PyNTuple::append,
93 "append ( DataSource ) -> None\n"
95 "Appends the contents of the DataSource to the NTuple." )
97 .def (
"replaceColumn",
100 const std::vector < double > & ) )
101 &PyNTuple::replaceColumn,
102 "replaceColumn ( index, sequence ) -> None\n"
104 "Replaces the indexed column." )
106 .def (
"replaceColumn",
108 (
const std::string &,
const std::vector < double > & ) )
109 &PyNTuple::replaceColumn,
110 "replaceColumn ( label, sequence ) -> None\n"
112 "Replaces the labeled column." )
116 "addRow ( sequence ) -> None\n"
118 "Append a row at the end." )
124 "Clears the data elements of the DataSource. That is, remove\n"
125 "all the rows while keeping the column labels." )
hippodraw::PyNTuple class interface.
void export_PyNTuple()
Exports the PyNTuple class to Python.
A wrapper for NTuple, so that when NTuple is used in Qt based application, the application object can...