当前位置: 首页>>代码示例>>C#>>正文


C# Vector.Size方法代码示例

本文整理汇总了C#中SceneLibrary.Vector.Size方法的典型用法代码示例。如果您正苦于以下问题:C# Vector.Size方法的具体用法?C# Vector.Size怎么用?C# Vector.Size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SceneLibrary.Vector的用法示例。


在下文中一共展示了Vector.Size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Unproject

 /// <summary>
 /// Convert a non-homogeneous vector into a homogeneous vector. Returns a
 /// new vector which is the input vector augmented by one more element
 /// of value 1.0.
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public Vector Unproject(Vector v)
 {
     int n = v.Size();
     Vector ret = new Vector(n+1);
     for (int i = 0; i < n; i++)
         ret[i] = v[i];
     ret[n] = 1;
     return ret;
 }
开发者ID:iManbot,项目名称:monoslam,代码行数:16,代码来源:vector.cs

示例2: fill_states

        public void fill_states(Vector V)
        {
            //assert (V.Size() == total_state_size);

            uint y_position = 0;

            xv.Update(V.Extract((int)motion_model.STATE_SIZE, (int)y_position));
            y_position += motion_model.STATE_SIZE;
  
            uint y_feature_no = 0;

            Feature it;
            for (int i=0;i<feature_list.Count;i++)
            {
                if (y_position < V.Size())
                {
                    it = (Feature)feature_list[i];
                    it.set_y(V.Extract((int)it.get_feature_measurement_model().FEATURE_STATE_SIZE, (int)y_position));
                    y_feature_no++;
                    y_position += it.get_feature_measurement_model().FEATURE_STATE_SIZE;
                }
            }

            //assert (y_feature_no <= feature_list.size() && y_position <= total_state_size);
        }
开发者ID:iManbot,项目名称:monoslam,代码行数:25,代码来源:scene_single.cs

示例3: Project

 /// <summary>
 /// Project a homogeneous vector down to a non-homogeneous one. Returns a
 /// new vector containing all the elements of the input vector, apart from the
 /// last one, divided by the last one.
 /// </summary>
 /// <param name="v"></param>
 /// <returns></returns>
 public Vector Project(Vector v)
 {
     int newsize = v.Size()-1;
     float factor = v[newsize];
     Vector ret = new Vector(newsize);
     for (int i = 0; i < newsize; i++)
         ret[i] = v[i] / factor;
     return ret;
 }
开发者ID:iManbot,项目名称:monoslam,代码行数:16,代码来源:vector.cs


注:本文中的SceneLibrary.Vector.Size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。