• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# MWArray类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MWArray的典型用法代码示例。如果您正苦于以下问题:C# MWArray类的具体用法?C# MWArray怎么用?C# MWArray使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MWArray类属于命名空间,在下文中一共展示了MWArray类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Image

        public Image(string path)
        {
            MWNumericArray descriptor = null;
            MWCharArray mw_path;
            try
            {
                mw_path = new MWCharArray(path);
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.ToString());
                return;
            }
            
            Loader Loader = new Loader();
            image = Loader.loadimage(mw_path);
            descriptor = (MWNumericArray)image;
            try
            {
                Array = new ImageArray((double[,])descriptor.ToArray(MWArrayComponent.Real));
            }
            catch (InvalidCastException exc)
            {
                descriptor = null;
                mw_path = null;
                Loader = null;
                GC.Collect();
                return;
            }

            Height = Array.Array.GetLength(0);
            Width = Array.Array.GetLength(1);
            GetBitmap();

            descriptor = null;
            mw_path = null;
            Loader = null;
            GC.Collect();
        }
开发者ID:Forpatril,项目名称:Diploma,代码行数:39,代码来源:Image.cs


示例2: enrollment

        //@param s_id subject id
        //@param ecg_in a single sample value of the subject's ECG
        public void enrollment(double[] ecg_in, int s_id)
        {
            for( int i = 0; i < ecg_in.Length; i++)
            {
                ecg[i] = ecg_in[i];
            }

            //Create a MWArray to pass value into converted matlab function
                MWNumericArray subj_id = new MWNumericArray(s_id);
                MWNumericArray ecg_raw = new MWNumericArray(1280, 1, ecg);
                MWArray temp = AClass.process(ecg_raw, M);  //process ecg data(filter and AC)

                //autocorrelated signal is added to both gallery
                MWArray gal = new MWNumericArray();
                gal = gallery;
                gallery = AClass.addtogallery(gal, temp);

                MWArray gal1 = new MWNumericArray();
                gal1 = enrollee_gallery;
                enrollee_gallery = AClass.addtogallery(gal1, temp);

                //subject id is added to the id vector
                MWArray id_temp = new MWNumericArray();
                id_temp = id;
                id = AClass.addtoid(id_temp, subj_id);

                MWArray id_temp1 = new MWNumericArray();
                id_temp1 = enrollee_id;
                enrollee_id = AClass.addtoid(id_temp1, subj_id);

                //the weight matric is calculated
                weights = AClass.dlda(gallery, id);

                //enrollee gallery is projected
                projected_gallery = AClass.projection(gallery, weights); //use enrollee gallery if want to project enrollee gallery
        }
开发者ID:rafikmatta,项目名称:ece496-capstone-heartid,代码行数:38,代码来源:algorithm.cs


示例3: pdchsim

 /// <summary>
 /// Provides the standard 2-input interface to the pdchsim M-function.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return.</param>
 /// <param name="traffic">Input argument #1</param>
 /// <param name="pdchuse">Input argument #2</param>
 /// <returns>An Array of length "numArgsOut" containing the output
 /// arguments.</returns>
 ///
 public MWArray[] pdchsim(int numArgsOut, MWArray traffic, MWArray pdchuse)
   {
     return mcr.EvaluateFunction(numArgsOut, "pdchsim", traffic, pdchuse);
   }
开发者ID:sridhar19091986,项目名称:protocolmining,代码行数:15,代码来源:PdchNewclass.cs


示例4: newton

 /// <summary>
 /// Provides an interface for the newton function in which the input and output
 /// arguments are specified as an array of MWArrays.
 /// </summary>
 /// <remarks>
 /// This method will allocate and return by reference the output argument
 /// array.<newpara></newpara>
 /// M-Documentation:
 /// [x, y] = newton(A,b,x0,niter);
 /// solves the linear least squares problem with nonnegative variables using the
 /// newton's algorithm in [1].
 /// Input:
 /// A:      [MxN] matrix 
 /// b:      [Mx1] vector
 /// x0:     [Nx1] vector of initial values. x0 > 0. Default value: ones(n,1)
 /// niter:  Number of iterations. Default value: 10
 /// Output
 /// x:      solution
 /// y:      complementary solution
 /// [1] Portugal, Judice and Vicente, A comparison of block pivoting and
 /// interior point algorithms for linear least squares problems with
 /// nonnegative variables, Mathematics of Computation, 63(1994), pp. 625-643
 /// Uriel Roque
 /// 02.05.2006
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return</param>
 /// <param name= "argsOut">Array of MWArray output arguments</param>
 /// <param name= "argsIn">Array of MWArray input arguments</param>
 ///
 public void newton(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
   {
     mcr.EvaluateFunction("newton", numArgsOut, ref argsOut, argsIn);
   }
开发者ID:sridhar19091986,项目名称:protocolmining,代码行数:33,代码来源:PdchNewclass.cs


示例5: loadimage

 /// <summary>
 /// Provides an interface for the loadimage function in which the input and output
 /// arguments are specified as an array of MWArrays.
 /// </summary>
 /// <remarks>
 /// This method will allocate and return by reference the output argument
 /// array.<newpara></newpara>
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return</param>
 /// <param name= "argsOut">Array of MWArray output arguments</param>
 /// <param name= "argsIn">Array of MWArray input arguments</param>
 ///
 public void loadimage(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
 {
   mcr.EvaluateFunction("loadimage", numArgsOut, ref argsOut, argsIn);
 }
开发者ID:Forpatril,项目名称:Diploma,代码行数:16,代码来源:Loader.cs


示例6: addtoid

 /// <summary>
 /// Provides an interface for the addtoid function in which the input and output
 /// arguments are specified as an array of MWArrays.
 /// </summary>
 /// <remarks>
 /// This method will allocate and return by reference the output argument
 /// array.<newpara></newpara>
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return</param>
 /// <param name= "argsOut">Array of MWArray output arguments</param>
 /// <param name= "argsIn">Array of MWArray input arguments</param>
 ///
 public void addtoid(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
 {
     mcr.EvaluateFunction("addtoid", numArgsOut, ref argsOut, argsIn);
 }
开发者ID:rafikmatta,项目名称:ece496-capstone-heartid,代码行数:16,代码来源:dotnetclass.cs


示例7: addtogallery

 /// <summary>
 /// Provides the standard 2-input MWArray interface to the addtogallery M-function.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return.</param>
 /// <param name="gal">Input argument #1</param>
 /// <param name="addition">Input argument #2</param>
 /// <returns>An Array of length "numArgsOut" containing the output
 /// arguments.</returns>
 ///
 public MWArray[] addtogallery(int numArgsOut, MWArray gal,
                               MWArray addition)
 {
     return mcr.EvaluateFunction(numArgsOut, "addtogallery",
                                 gal, addition);
 }
开发者ID:rafikmatta,项目名称:ece496-capstone-heartid,代码行数:17,代码来源:dotnetclass.cs


示例8: F_EigenSys

 /// <summary>
 /// Provides an interface for the F_EigenSys function in which the input and output
 /// arguments are specified as an array of MWArrays.
 /// </summary>
 /// <remarks>
 /// This method will allocate and return by reference the output argument
 /// array.<newpara></newpara>
 /// M-Documentation:
 /// Syntax: [eVec,eVal]=F_EigenSys(M);
 /// - Eigen values and vectors of M, sorted by decreasing eigen values.
 /// Author: Lu Juwei - U of Toronto
 /// Created in 27 May 2001
 /// Modified in 6 August 2003
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return</param>
 /// <param name= "argsOut">Array of MWArray output arguments</param>
 /// <param name= "argsIn">Array of MWArray input arguments</param>
 ///
 public void F_EigenSys(int numArgsOut, ref MWArray[] argsOut, MWArray[] argsIn)
 {
     mcr.EvaluateFunction("F_EigenSys", numArgsOut, ref argsOut, argsIn);
 }
开发者ID:rafikmatta,项目名称:ece496-capstone-heartid,代码行数:22,代码来源:dotnetclass.cs


示例9: SchwartzAndSmith

 /// <summary>
 /// Provides the standard 12-input MWArray interface to the SchwartzAndSmith
 /// M-function.
 /// </summary>
 /// <remarks>
 /// M-Documentation:
 /// Script: MAIN - fonction principale du programme
 /// Permet la vue globable sur tout le processing
 /// </remarks>
 /// <param name="numArgsOut">The number of output arguments to return.</param>
 /// <param name="maxiter">Input argument #1</param>
 /// <param name="x0">Input argument #2</param>
 /// <param name="e0">Input argument #3</param>
 /// <param name="maturity">Input argument #4</param>
 /// <param name="y">Input argument #5</param>
 /// <param name="k_in1">Input argument #6</param>
 /// <param name="mu_e_in1">Input argument #7</param>
 /// <param name="sigma_x_in1">Input argument #8</param>
 /// <param name="sigma_e_in1">Input argument #9</param>
 /// <param name="p_xe_in1">Input argument #10</param>
 /// <param name="lambda_e_in1">Input argument #11</param>
 /// <param name="lambda_x_in1">Input argument #12</param>
 /// <returns>An Array of length "numArgsOut" containing the output
 /// arguments.</returns>
 ///
 public MWArray[] SchwartzAndSmith(int numArgsOut, MWArray maxiter, MWArray x0, 
                             MWArray e0, MWArray maturity, MWArray y, MWArray k_in1, 
                             MWArray mu_e_in1, MWArray sigma_x_in1, MWArray 
                             sigma_e_in1, MWArray p_xe_in1, MWArray lambda_e_in1, 
                             MWArray lambda_x_in1)
 {
   return mcr.EvaluateFunction(numArgsOut, "SchwartzAndSmith", maxiter, x0, e0, maturity, y, k_in1, mu_e_in1, sigma_x_in1, sigma_e_in1, p_xe_in1, lambda_e_in1, lambda_x_in1);
 }
开发者ID:BietteMaxime,项目名称:black-money-pricer,代码行数:33,代码来源:Schwartz.cs


示例10: projection

 /// <summary>
 /// Provides a single output, 2-input MWArray interface to the projection
 /// M-function.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="input">Input argument #1</param>
 /// <param name="weight">Input argument #2</param>
 /// <returns>An MWArray containing the first output argument.</returns>
 ///
 public MWArray projection(MWArray input, MWArray weight)
 {
     return mcr.EvaluateFunction("projection", input, weight);
 }
开发者ID:rafikmatta,项目名称:ece496-capstone-heartid,代码行数:14,代码来源:dotnetclass.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MabiPacket类代码示例发布时间:2022-05-24
下一篇:
C# MSpecUnitTestProvider类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap