16#ifdef ROOFIT_WITH_RYML
27 ChildItImpl(Nd &
n,
size_t p) : node(
n), pos(
p) {}
28 ChildItImpl(
const ChildItImpl &other) : node(other.node), pos(other.pos) {}
29 std::unique_ptr<typename child_iterator::Impl> clone()
const override
31 return std::make_unique<ChildItImpl>(node, pos);
33 void forward()
override { ++pos; }
35 Nd ¤t()
override {
return node.child(pos); }
36 bool equal(
const typename child_iterator::Impl &other)
const override
38 auto it =
dynamic_cast<const ChildItImpl<Nd> *
>(&other);
39 return it && &(it->node) == &(this->node) && (it->pos) == this->pos;
51template class JSONNode::child_iterator_t<JSONNode>;
52template class JSONNode::child_iterator_t<const JSONNode>;
56 return {
child_iterator(std::make_unique<::ChildItImpl<JSONNode>>(*
this, 0)),
71template <
typename... Args>
75#ifdef ROOFIT_WITH_RYML
76 return std::make_unique<TRYMLTree>(std::forward<Args>(args)...);
78 throw std::runtime_error(
79 "Requesting JSON tree with rapidyaml backend, but rapidyaml could not be found by ROOT when it was compiled.");
82 return std::make_unique<TJSONTree>(std::forward<Args>(args)...);
97 std::stringstream ss{str};
105 if (
name ==
"rapidyaml") {
106#ifdef ROOFIT_WITH_RYML
112 if (
name ==
"nlohmann-json")
136 if (
name ==
"rapidyaml")
138 if (
name ==
"nlohmann-json")
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
winID h TVirtualViewer3D TVirtualGLPainter p
child_iterator_t< JSONNode > child_iterator
virtual children_view children()
virtual size_t num_children() const =0
virtual void writeJSON(std::ostream &os) const =0
child_iterator_t< const JSONNode > const_child_iterator
static void setBackend(std::string const &name)
Set the library that serves as the backend for the JSON interface.
static Backend & getBackendEnum()
static std::unique_ptr< JSONTree > create()
static bool hasBackend(std::string const &name)
Check if ROOT was compiled with support for a certain JSON backend library.
static std::string getBackend()
Returns the name of the library that serves as the backend for the JSON interface,...
static std::unique_ptr< JSONTree > createImpl(Args &&...args)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
void backward(LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
backward application of the weights (back-propagation of the error)