本文整理汇总了C#中System.Data.SqlTypes.SqlDouble类的典型用法代码示例。如果您正苦于以下问题:C# SqlDouble类的具体用法?C# SqlDouble怎么用?C# SqlDouble使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqlDouble类属于System.Data.SqlTypes命名空间,在下文中一共展示了SqlDouble类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FillRow
public static void FillRow(object inputObject,
out SqlInt32 fileId,
out SqlString ctn,
out SqlString platform,
out SqlString platformId,
out SqlDouble frequency,
out DateTime timeStamp)
{
var row = (Row) inputObject;
fileId = row.FileId;
ctn = row.Collar.Ctn;
platform = row.Collar.Platform;
platformId = row.Collar.PlatformId;
frequency = row.Collar.Frequency;
timeStamp = row.Collar.TimeStamp;
}
示例2: Accumulate
public void Accumulate(SqlDouble Value)
{
if (start)
{
min = Value;
max = Value;
start = false;
}
else
{
if (Value < min)
min = Value;
if (Value > max)
max = Value;
result = max - min;
}
}
示例3: Accumulate
public void Accumulate(SqlDouble input)
{
if (input.IsNull != true)
{
doubleList.Add(input.Value);
}
}
示例4: String_Distances_Filler
public static void String_Distances_Filler(object distances,
out SqlString fromString, out SqlString toString, out SqlDouble Hamming_Distance,
out SqlDouble Jaccard_Distance, out SqlDouble Jaro_Distance, out SqlDouble Jaro_Winkler_Distance,
out SqlDouble Levenshtein_Distance, out SqlDouble Levenshtein_Distance_Lower_Bound,
out SqlDouble Levenshtein_Distance_Upper_Bound, out SqlDouble Normalized_Levenshtein_Distance,
out SqlDouble Overlap_Coefficient, out SqlDouble Ratcliff_Obershelp_Similarity,
out SqlDouble Sorensen_Dice_Index, out SqlDouble Sorensen_Dice_Distance,
out SqlDouble Tanimoto_Coefficient) {
AllDistanceMetrics adm = (AllDistanceMetrics)distances;
fromString = adm.fromString;
toString = adm.toString;
Hamming_Distance = adm.Hamming_Distance;
Jaccard_Distance = adm.Jaccard_Distance;
Jaro_Distance = adm.Jaro_Distance;
Jaro_Winkler_Distance = adm.Jaro_Winkler_Distance;
Levenshtein_Distance = adm.Levenshtein_Distance;
Levenshtein_Distance_Lower_Bound = adm.Levenshtein_Distance_Lower_Bound;
Levenshtein_Distance_Upper_Bound = adm.Levenshtein_Distance_Upper_Bound;
Normalized_Levenshtein_Distance = adm.Normalized_Levenshtein_Distance;
Overlap_Coefficient = adm.Overlap_Coefficient;
Ratcliff_Obershelp_Similarity = adm.Ratcliff_Obershelp_Similarity;
Sorensen_Dice_Index = adm.Sorensen_Dice_Index;
Sorensen_Dice_Distance = adm.Sorensen_Dice_Distance;
Tanimoto_Coefficient = adm.Tanimoto_Coefficient;
}
示例5: Accumulate
public void Accumulate(SqlDouble Value)
{
if(Value.IsNull == false)
{
_sum += Value.Value;
}
}
示例6: GetImageBound
public static SqlGeometry GetImageBound(SqlDouble Longitude, SqlDouble Latitude, SqlInt32 Width, SqlInt32 Height,
SqlDouble Zoom, SqlInt32 PixelYOffset)
{
long cpX, cpY, LeftTopX, LeftTopY, RightBottomX, RightBottomY;
long halfWidth = ((long) Width) >> 1;
long halfHeight = ((long) Height) >> 1;
double dZoom = (double) Zoom;
// получить центральный пиксел по коорд
cpX = (long) FromLongitudeToXPixel(Longitude, Zoom);
cpY = (long) (FromLatitudeToYPixel(Latitude, Zoom) + PixelYOffset);
LeftTopX = cpX - halfWidth;
LeftTopY = cpY - halfHeight;
RightBottomX = cpX + halfWidth;
RightBottomY = cpY + halfHeight;
double Lat1, Lon1, Lat2, Lon2;
Lat1 = FromYPixelToLat(LeftTopY, dZoom);
Lon1 = FromXPixelToLon(LeftTopX, dZoom);
Lat2 = FromYPixelToLat(RightBottomY, dZoom);
Lon2 = FromXPixelToLon(RightBottomX, dZoom);
//
var geomBuilder = new SqlGeometryBuilder();
geomBuilder.SetSrid((0));
geomBuilder.BeginGeometry(OpenGisGeometryType.Polygon);
geomBuilder.BeginFigure(Lon1, Lat1);
geomBuilder.AddLine(Lon1, Lat2);
geomBuilder.AddLine(Lon2, Lat2);
geomBuilder.AddLine(Lon2, Lat1);
geomBuilder.AddLine(Lon1, Lat1);
geomBuilder.EndFigure();
geomBuilder.EndGeometry();
return geomBuilder.ConstructedGeometry;
}
示例7: Accumulate
public void Accumulate(SqlDouble Value)
{
if (Value.IsNull == false)
{
_list.Add(Value.Value);
}
}
示例8: Box
public static object Box(SqlDouble a)
{
if (a.IsNull)
return null;
else
return a.Value;
}
示例9: Create
public void Create ()
{
SqlDouble Test = new SqlDouble ((double) 34.87);
Assert.AreEqual (34.87D, Test.Value, "#A01");
Test = new SqlDouble (-9000.6543);
Assert.AreEqual (-9000.6543D, Test.Value, "#A02");
}
示例10: Create
public void Create()
{
SqlDouble Test = new SqlDouble(34.87);
Assert.Equal(34.87D, Test.Value);
Test = new SqlDouble(-9000.6543);
Assert.Equal(-9000.6543D, Test.Value);
}
示例11: Create
public void Create()
{
SqlDouble Test= new SqlDouble ((double)34.87);
AssertEquals ("#A01", 34.87D, Test.Value);
Test = new SqlDouble (-9000.6543);
AssertEquals ("#A02", -9000.6543D, Test.Value);
}
示例12: FromLatitudeToYPixel
public static SqlInt64 FromLatitudeToYPixel(SqlDouble Latitude, SqlDouble zoomLevel)
{
var pixelGlobeSize = PixelTileSize*Math.Pow(2.0, (double) zoomLevel);
var f = Math.Min(Math.Max(Math.Sin((double) (Latitude*RadiansToDegreesRatio)), -0.9999d), 0.9999d);
var y =
Math.Round(Convert.ToSingle(pixelGlobeSize/2d) +
.5d*Math.Log((1d + f)/(1d - f))*-(pixelGlobeSize/(2d*Math.PI)));
return Convert.ToInt64(y);
}
示例13: Properties
public void Properties()
{
SqlDouble Test5443 = new SqlDouble (5443e12);
SqlDouble Test1 = new SqlDouble (1);
Assert ("#C01", SqlDouble.Null.IsNull);
AssertEquals ("#C02", 5443e12, Test5443.Value);
AssertEquals ("#C03", (double)1, Test1.Value);
}
示例14: Properties
public void Properties()
{
SqlDouble Test5443 = new SqlDouble(5443e12);
SqlDouble Test1 = new SqlDouble(1);
Assert.True(SqlDouble.Null.IsNull);
Assert.Equal(5443e12, Test5443.Value);
Assert.Equal(1, Test1.Value);
}
示例15: Properties
public void Properties ()
{
SqlDouble Test5443 = new SqlDouble (5443e12);
SqlDouble Test1 = new SqlDouble (1);
Assert.IsTrue (SqlDouble.Null.IsNull, "#C01");
Assert.AreEqual (5443e12, Test5443.Value, "#C02");
Assert.AreEqual ((double) 1, Test1.Value, "#C03");
}