當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。