You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TVecInt Class
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TVecInt Class

Class for one dimensional integer arrays.

Dew_Math_TVecIntDew_Math_TVecIntDew_Math_TVecIntDew_Math_TVecIntDew_Math_TVecIntDew_Math_TVecInt
Syntax
C#
Visual Basic
public class TVecInt : TAbstractMtxVecInt, ISerializable;

MtxVecInt.cs

Class for accessing and manipulating 8bit unsigned and 16 or 32 bit signed one dimensional arrays of integers and bits. Purpose of usage: 

 

  • leverage the SSEX/AVX instruction sets for integers
  • take advantage of reduce storage size and fast bit (and, or, xor, not) operations
  • provide basic (saturation) math support. Saturation math means that adding two integers whose result would be greater than the integer range will result in clipping of the result to the maximum value representable by the integer type.
  • support for super-conductive object cache allows efficient multi-core threading of algorithms using this type.
  • Pack and unpack bit arrays for much faster boolean processing.

 

The same object type can be used to work with three different integer types and integer precision is never changed implicitely. Mixing of different integer types or mixing with real types is not supported to avoid hidden cost of repeated conversions.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TVecInt a = new TVecInt(); a.SetIt(new int[] {1,2,4,3}); a.SortAscending(); // a = 1,2,3,4 } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!