struct QPanda::Variational::impl_stack

Overview

Implementation class for the stack operation. More…

#include <var.h>

struct impl_stack: public QPanda::Variational::impl
{
    // fields

    int m_axis;

    // construction

    impl_stack(int axis, const std::vector<var>&);
};

Inherited Members

public:
    // fields

    MatrixXd val;
    bool m_is_differentiable;
    op_type op;
    std::vector<var> children;
    std::vector<std::weak_ptr<impl>> parents;
    MatrixXd m_prob;

Detailed Documentation

Implementation class for the stack operation.

Fields

int m_axis

stack axis, should be either 0 or 1.

Construction

impl_stack(int axis, const std::vector<var>&)

Construct a new impl stack object by the axis and children. y = stack(axis=0, [a,b,c,d]). It will try to place a,b,c,d into one matrix with the same columns, if axis==1, the same rows.

Parameters:

axis

the stack axis.