.. index:: pair: class; QPanda::WeightedGraph .. _doxid-class_q_panda_1_1_weighted_graph: template class QPanda::WeightedGraph ==================================== .. toctree:: :hidden: .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class WeightedGraph: public :ref:`QPanda::Graph` { public: // typedefs typedef WeightedGraph<:ref:`T`>* :target:`Ref`; typedef std::unique_ptr`>> :target:`uRef`; typedef std::shared_ptr`>> :target:`sRef`; // construction :target:`WeightedGraph`( uint32_t n, :ref:`Type` ty = :ref:`Undirected` ); // methods void :target:`putEdge`( uint32_t i, uint32_t j, :ref:`T` w ); void :target:`setW`( uint32_t i, uint32_t j, :ref:`T` w ); :ref:`T` :target:`getW`( uint32_t i, uint32_t j ) const; static bool :target:`ClassOf`(const :ref:`Graph`* g); static :ref:`uRef` :target:`Create`( uint32_t n, :ref:`Type` ty = :ref:`Undirected` ); }; // direct descendants class :ref:`ArchGraph`; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef :ref:`Graph`* :ref:`Ref`; typedef std::unique_ptr<:ref:`Graph`> :ref:`uRef`; typedef std::shared_ptr<:ref:`Graph`> :ref:`sRef`; // enums enum :ref:`Kind`; enum :ref:`Type`; // methods uint32_t :ref:`inDegree`(uint32_t i) const; uint32_t :ref:`outDegree`(uint32_t i) const; uint32_t :ref:`size`() const; std::set& :ref:`succ`(uint32_t i); const std::set& :ref:`c_succ`(uint32_t i) const; std::set& :ref:`pred`(uint32_t i); std::set :ref:`adj`(uint32_t i) const; void :ref:`putEdge`(uint32_t i, uint32_t j); bool :ref:`hasEdge`(uint32_t i, uint32_t j) const; bool :ref:`isWeighted`() const; bool :ref:`isArch`() const; bool :ref:`isDirectedGraph`() const; std::string :ref:`dotify`(std::string name = "Dump") const; static bool :ref:`ClassOf`(const :ref:`Graph`* g); static :ref:`uRef` :ref:`Create`(uint32_t n, :ref:`Type` ty = :ref:`Undirected`);