text: /*=================================================================================
   *	                    Copyleft! 2018 William Yu
   *          Some rights reserved：CC(creativecommons.org)BY-NC-SA
   *                      Copyleft! 2018 William Yu
   *      版权部分所有，遵循CC(creativecommons.org)BY-NC-SA协议授权方式使用
   *
   * Filename                : 
   * Description             : 视觉SLAM十四讲 学习记录
   * Reference               : 
   * Programmer(s)           : William Yu, windmillyucong@163.com
   * Company                 : HUST, DMET国家重点实验室FOCUS团队
   * Modification History	   : ver1.0, 2018.04.26, William Yu
   *                           ver1.1, 2018.05.12, William Yu, add notes
  =================================================================================*/
  
  #include "myslam/map.h"
  
  namespace myslam
  {
  
  void Map::insertKeyFrame ( Frame::Ptr frame )
  {
      cout<<"Key frame size = "<<keyframes_.size()<<endl;
      if ( keyframes_.find(frame->id_) == keyframes_.end() )
      {
          keyframes_.insert( make_pair(frame->id_, frame) );
      }
      else
      {
          keyframes_[ frame->id_ ] = frame;
      }
  }
  
  void Map::insertMapPoint ( MapPoint::Ptr map_point )
  {
      if ( map_points_.find(map_point->id_) == map_points_.end() )
      {
          map_points_.insert( make_pair(map_point->id_, map_point) );
      }
      else 
      {
          map_points_[map_point->id_] = map_point;
      }
  }
  
  
  }
  