Merge pull request #998 from borglab/fix/move_empty
						commit
						3c9ace628a
					
				|  | @ -73,9 +73,6 @@ public: | ||||||
|     Base::print(s, formatter); |     Base::print(s, formatter); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /** Test whether the factor is empty */ |  | ||||||
|   virtual bool empty() const { return size() == 0; } |  | ||||||
| 
 |  | ||||||
|   /// @}
 |   /// @}
 | ||||||
|   /// @name Standard Interface
 |   /// @name Standard Interface
 | ||||||
|   /// @{
 |   /// @{
 | ||||||
|  |  | ||||||
|  | @ -112,6 +112,9 @@ typedef FastSet<FactorIndex> FactorIndexSet; | ||||||
|    /// @name Standard Interface
 |    /// @name Standard Interface
 | ||||||
|    /// @{
 |    /// @{
 | ||||||
| 
 | 
 | ||||||
|  |    /// Whether the factor is empty (involves zero variables).
 | ||||||
|  |    bool empty() const { return keys_.empty(); } | ||||||
|  | 
 | ||||||
|    /// First key
 |    /// First key
 | ||||||
|    Key front() const { return keys_.front(); } |    Key front() const { return keys_.front(); } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -117,9 +117,6 @@ namespace gtsam { | ||||||
|     /** Clone a factor (make a deep copy) */ |     /** Clone a factor (make a deep copy) */ | ||||||
|     virtual GaussianFactor::shared_ptr clone() const = 0; |     virtual GaussianFactor::shared_ptr clone() const = 0; | ||||||
| 
 | 
 | ||||||
|     /** Test whether the factor is empty */ |  | ||||||
|     virtual bool empty() const = 0; |  | ||||||
| 
 |  | ||||||
|     /**
 |     /**
 | ||||||
|      * Construct the corresponding anti-factor to negate information |      * Construct the corresponding anti-factor to negate information | ||||||
|      * stored stored in this factor. |      * stored stored in this factor. | ||||||
|  |  | ||||||
|  | @ -221,9 +221,6 @@ namespace gtsam { | ||||||
|      */ |      */ | ||||||
|     GaussianFactor::shared_ptr negate() const override; |     GaussianFactor::shared_ptr negate() const override; | ||||||
| 
 | 
 | ||||||
|     /** Check if the factor is empty.  TODO: How should this be defined? */ |  | ||||||
|     bool empty() const override { return size() == 0 /*|| rows() == 0*/; } |  | ||||||
| 
 |  | ||||||
|     /** Return the constant term \f$ f \f$ as described above
 |     /** Return the constant term \f$ f \f$ as described above
 | ||||||
|      * @return The constant term \f$ f \f$ |      * @return The constant term \f$ f \f$ | ||||||
|      */ |      */ | ||||||
|  |  | ||||||
|  | @ -260,9 +260,6 @@ namespace gtsam { | ||||||
|      */ |      */ | ||||||
|     GaussianFactor::shared_ptr negate() const override; |     GaussianFactor::shared_ptr negate() const override; | ||||||
| 
 | 
 | ||||||
|     /** Check if the factor is empty.  TODO: How should this be defined? */ |  | ||||||
|     bool empty() const override { return size() == 0 /*|| rows() == 0*/; } |  | ||||||
| 
 |  | ||||||
|     /** is noise model constrained ? */ |     /** is noise model constrained ? */ | ||||||
|     bool isConstrained() const { |     bool isConstrained() const { | ||||||
|       return model_ && model_->isConstrained(); |       return model_ && model_->isConstrained(); | ||||||
|  |  | ||||||
|  | @ -260,10 +260,6 @@ public: | ||||||
|         "RegularImplicitSchurFactor::clone non implemented"); |         "RegularImplicitSchurFactor::clone non implemented"); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   bool empty() const override { |  | ||||||
|     return false; |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   GaussianFactor::shared_ptr negate() const override { |   GaussianFactor::shared_ptr negate() const override { | ||||||
|     return boost::make_shared<RegularImplicitSchurFactor<CAMERA> >(keys_, |     return boost::make_shared<RegularImplicitSchurFactor<CAMERA> >(keys_, | ||||||
|         FBlocks_, PointCovariance_, E_, b_); |         FBlocks_, PointCovariance_, E_, b_); | ||||||
|  |  | ||||||
|  | @ -144,9 +144,6 @@ namespace gtsam { | ||||||
|     /// @name Standard Interface
 |     /// @name Standard Interface
 | ||||||
|     /// @{
 |     /// @{
 | ||||||
| 
 | 
 | ||||||
|     /** Whether the factor is empty (involves zero variables). */ |  | ||||||
|     bool empty() const { return keys_.empty(); } |  | ||||||
| 
 |  | ||||||
|     /** Eliminate the variables in \c keys, in the order specified in \c keys, returning a
 |     /** Eliminate the variables in \c keys, in the order specified in \c keys, returning a
 | ||||||
|      *  conditional and marginal. */ |      *  conditional and marginal. */ | ||||||
|     std::pair<boost::shared_ptr<SymbolicConditional>, boost::shared_ptr<SymbolicFactor> > |     std::pair<boost::shared_ptr<SymbolicConditional>, boost::shared_ptr<SymbolicFactor> > | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue