行列の非数値判定
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_mat_is_normal(
FMATRIX_PTR a
) |
Visual Basic |
---|
Public Shared Function fnFIE_mat_is_normal (
a As FMATRIX_PTR
) As Integer |
Return Value
Type:
Int32
以下のエラーコードを返します。
エラーコード:f_err | 内容 |
---|
0 | a は非数値を一つも含んでいない |
1 | a は非数値を含んでいる |
F_ERR_INVALID_PARAM | パラメータエラー: a に IntPtr.Zero が指定された |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Remarks
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_mat_is_normal()
{
FMATRIX_PTR a = FMATRIX_PTR.Zero;
try
{
int status = (int)f_err.F_ERR_NONE;
a = api.fnFIE_mat_aalloc(3, 3);
a[0, 0] = 1.0; a[0, 1] = 3.0; a[0, 2] = 3.0;
a[1, 0] = 4.0; a[1, 1] = -2.0; a[1, 2] = 1.0;
a[2, 0] = 2.0; a[2, 1] = 5.0; a[2, 2] = -1.0;
Assert.IsTrue(a != FMATRIX_PTR.Zero, "エラーが発生しました。");
status = api.fnFIE_mat_is_normal(a);
Assert.IsTrue(compare(status, 1, defs.DBL_EPS), "エラーが発生しました。(status={0})", status);
}
catch (System.Exception ex)
{
Assert.Fail(ex.Message);
}
finally
{
api.fnFIE_mat_afree(a);
}
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_mat_is_normal()
Dim a As FMATRIX_PTR = FMATRIX_PTR.Zero
Try
Dim status As Integer = CInt(f_err.F_ERR_NONE)
a = api.fnFIE_mat_aalloc(3, 3)
a(0, 0) = 1.0
a(0, 1) = 3.0
a(0, 2) = 3.0
a(1, 0) = 4.0
a(1, 1) = -2.0
a(1, 2) = 1.0
a(2, 0) = 2.0
a(2, 1) = 5.0
a(2, 2) = -1.0
Assert.IsTrue(a <> FMATRIX_PTR.Zero, "エラーが発生しました。")
status = api.fnFIE_mat_is_normal(a)
Assert.IsTrue(compare(status, 1, defs.DBL_EPS), "エラーが発生しました。(status={0})", status)
Catch ex As System.Exception
Assert.Fail(ex.Message)
Finally
api.fnFIE_mat_afree(a)
End Try
End Sub
End Class |
See Also