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


C# Norm类代码示例

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


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

示例1: MatrixNorm

        public override double MatrixNorm(Norm norm, int rows, int columns, double[] matrix)
        {
            if (matrix == null)
            {
                throw new ArgumentNullException("matrix");
            }

            if (rows <= 0)
            {
                throw new ArgumentException(Resources.ArgumentMustBePositive, "rows");
            }

            if (columns <= 0)
            {
                throw new ArgumentException(Resources.ArgumentMustBePositive, "columns");
            }

            if (matrix.Length < rows * columns)
            {
                throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows * columns), "matrix");
            }

            var work = new double[rows];
            return SafeNativeMethods.d_matrix_norm((byte)norm, rows, columns, matrix, work);
        }
开发者ID:MattHeffron,项目名称:mathnet-numerics,代码行数:25,代码来源:MklLinearAlgebraProvider.Double.cs

示例2: MatrixNorm

        public override float MatrixNorm(Norm norm, int rows, int columns, float[] matrix)
        {
            if (matrix == null)
            {
                throw new ArgumentNullException("matrix");
            }

            if (rows <= 0)
            {
                throw new ArgumentException(Resources.ArgumentMustBePositive, "rows");
            }

            if (columns <= 0)
            {
                throw new ArgumentException(Resources.ArgumentMustBePositive, "columns");
            }

            if (matrix.Length < rows * columns)
            {
                throw new ArgumentException(string.Format(Resources.ArrayTooSmall, rows * columns), "matrix");
            }

            var work = new float[rows];
            return MatrixNorm(norm, rows, columns, matrix, work);
        }
开发者ID:nrolland,项目名称:mathnet-numerics,代码行数:25,代码来源:MklLinearAlgebraProvider.Common.cs

示例3: Edit

 //
 // GET: /Games/Edit/5
 public ActionResult Edit(Norm.ObjectId id)
 {
     Game game = context.Games.GetAll().Single(x => x.Id == id);
     return View(game);
 }
开发者ID:park9140,项目名称:GARDIS,代码行数:7,代码来源:GamesController.cs

示例4: MatrixNorm

 /// <summary>
 /// Computes the requested <see cref="Norm"/> of the matrix.
 /// </summary>
 /// <param name="norm">The type of norm to compute.</param>
 /// <param name="matrix">The matrix to compute the norm from.</param>
 /// <returns>
 /// The requested <see cref="Norm"/> of the matrix.
 /// </returns>
 public Complex MatrixNorm(Norm norm, Complex[] matrix)
 {
     throw new NotImplementedException();
 }
开发者ID:hany-abdelrahman,项目名称:mathnet-numerics,代码行数:12,代码来源:AtlasLinearAlgebraProvider.cs

示例5: MatrixNorm

 /// <summary>
 /// Computes the requested <see cref="Norm"/> of the matrix.
 /// </summary>
 /// <param name="norm">The type of norm to compute.</param>
 /// <param name="rows">The number of rows.</param>
 /// <param name="columns">The number of columns.</param>
 /// <param name="matrix">The matrix to compute the norm from.</param>
 /// <param name="work">The work array. Not used in the managed provider.</param>
 /// <returns>
 /// The requested <see cref="Norm"/> of the matrix.
 /// </returns>
 public virtual double MatrixNorm(Norm norm, int rows, int columns, double[] matrix, double[] work)
 {
     return MatrixNorm(norm, rows, columns, matrix);
 }
开发者ID:rherbrich,项目名称:mathnet-numerics,代码行数:15,代码来源:ManagedLinearAlgebraProvider.Double.cs

示例6: MatrixNorm

 /// <summary>
 /// Computes the requested <see cref="Norm"/> of the matrix.
 /// </summary>
 /// <param name="norm">The type of norm to compute.</param>
 /// <param name="rows">The number of rows.</param>
 /// <param name="columns">The number of columns.</param>
 /// <param name="matrix">The matrix to compute the norm from.</param>
 /// <returns>
 /// The requested <see cref="Norm"/> of the matrix.
 /// </returns>
 public Complex32 MatrixNorm(Norm norm, int rows, int columns, Complex32[] matrix)
 {
     throw new NotImplementedException();
 }
开发者ID:rafaortega,项目名称:mathnet-numerics,代码行数:14,代码来源:MklLinearAlgebraProvider.cs

示例7: Edit

 //
 // GET: /Users/Edit/5
 public ActionResult Edit(Norm.ObjectId id)
 {
     User user = context.Users.GetAll().Single(x => x.Id == id);
     return View(user);
 }
开发者ID:park9140,项目名称:GARDIS,代码行数:7,代码来源:UsersController.cs

示例8: Details

 //
 // GET: /Users/Details/5
 public ViewResult Details(Norm.ObjectId id)
 {
     User user = context.Users.GetAll().Single(x => x.Id == id);
     return View(user);
 }
开发者ID:park9140,项目名称:GARDIS,代码行数:7,代码来源:UsersController.cs

示例9: DeleteConfirmed

 public ActionResult DeleteConfirmed(Norm.ObjectId id)
 {
     User user = context.Users.GetAll().Single(x => x.Id == id);
     context.Users.Delete(user);
     return RedirectToAction("Index");
 }
开发者ID:park9140,项目名称:GARDIS,代码行数:6,代码来源:UsersController.cs

示例10: CanComputeMatrixNorm

 public void CanComputeMatrixNorm(Norm norm, double[] matrix, double[] work)
 {
 }
开发者ID:joeynelson,项目名称:mathnet-numerics,代码行数:3,代码来源:LinearAlgebraProviderTests.cs

示例11: Edit

 //
 // GET: /HashTags/Edit/5
 public ActionResult Edit(Norm.ObjectId id)
 {
     HashTag hashtag = _repository.Linq().Single(x => x.Id == id);
     return View(hashtag);
 }
开发者ID:richardkundl,项目名称:HashMasher,代码行数:7,代码来源:HashTagsController.cs

示例12: Details

 //
 // GET: /HashTags/Details/5
 public ViewResult Details(Norm.ObjectId id)
 {
     HashTag hashtag = _repository.Linq().Single(x => x.Id == id);
     return View(hashtag);
 }
开发者ID:richardkundl,项目名称:HashMasher,代码行数:7,代码来源:HashTagsController.cs

示例13: DeleteConfirmed

 public ActionResult DeleteConfirmed(Norm.ObjectId id)
 {
     _repository.Remove(id);
     return RedirectToAction("Index");
 }
开发者ID:richardkundl,项目名称:HashMasher,代码行数:5,代码来源:HashTagsController.cs

示例14: Bytes

			// Load & cache full bytes array.  Returns bytes.
			public byte[] Bytes()
			{
				lock (this)
				{
					System.Diagnostics.Debug.Assert(refCount > 0 &&(origNorm == null || origNorm.refCount > 0));
					if (bytes == null)
					{
						// value not yet read
						System.Diagnostics.Debug.Assert(bytesRef == null);
						if (origNorm != null)
						{
							// Ask origNorm to load so that for a series of
							// reopened readers we share a single read-only
							// byte[]
							bytes = origNorm.Bytes();
							bytesRef = origNorm.bytesRef;
							bytesRef.IncRef();
							
							// Once we've loaded the bytes we no longer need
							// origNorm:
							origNorm.DecRef();
							origNorm = null;
						}
						else
						{
							// We are the origNorm, so load the bytes for real
							// ourself:
							int count = Enclosing_Instance.MaxDoc();
							bytes = new byte[count];
							
							// Since we are orig, in must not be null
							System.Diagnostics.Debug.Assert(in_Renamed != null);
							
							// Read from disk.
							lock (in_Renamed)
							{
								in_Renamed.Seek(normSeek);
								in_Renamed.ReadBytes(bytes, 0, count, false);
							}
							
							bytesRef = new Ref();
							CloseInput();
						}
					}
					
					return bytes;
				}
			}
开发者ID:nzdunic,项目名称:ravendb,代码行数:49,代码来源:SegmentReader.cs

示例15: MatrixNorm

        /// <summary>
        /// Computes the requested <see cref="Norm"/> of the matrix.
        /// </summary>
        /// <param name="norm">The type of norm to compute.</param>
        /// <param name="rows">The number of rows.</param>
        /// <param name="columns">The number of columns.</param>
        /// <param name="matrix">The matrix to compute the norm from.</param>
        /// <returns>
        /// The requested <see cref="Norm"/> of the matrix.
        /// </returns>
        public double MatrixNorm(Norm norm, int rows, int columns, double[] matrix)
        {
            var ret = 0.0;
            switch (norm)
            {
                case Norm.OneNorm:
                    break;
                case Norm.LargestAbsoluteValue:
                    break;
                case Norm.InfinityNorm:
                    break;
                case Norm.FrobeniusNorm:
                    break;
            }

            return ret;
        }
开发者ID:xmap2008,项目名称:mathnet-numerics,代码行数:27,代码来源:ManagedLinearAlgebraProvider.cs


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