ベクトルの解放

Namespace: fvalgcli
Assembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)

Syntax

C#
public static void fnFIE_mat_vfree(
	FVECTOR_PTR vect
)
Visual Basic
Public Shared Sub fnFIE_mat_vfree ( 
	vect As FVECTOR_PTR
)

Parameters

vect
Type: fvalgcli..::..FVECTOR_PTR
解放するベクトル

Examples

C# Copy imageCopy
//    $Revision: 1.1 $

using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;

namespace TC
{
    public partial class FIE
    {
        [FvPluginExecute]
        public void fnFIE_mat_vfree()
        {
            // 次元3のベクトル v を確保
            FVECTOR_PTR v = FVECTOR_PTR.Zero;

            try
            {
                v = api.fnFIE_mat_valloc(3);

                Assert.IsTrue(v != FVECTOR_PTR.Zero, "エラーが発生しました。");
                // v を次元10にリサイズ
                int status = api.fnFIE_mat_vrealloc(v, 10);
                Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "エラーが発生しました。({0})", (f_err)status);
            }
            finally
            {
                api.fnFIE_mat_vfree(v);
            }
        }
    }
}


Visual Basic Copy imageCopy
'    $Revision: 1.1 $

Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli

Public Partial Class FIE
    <FvPluginExecute> _
    Public Sub fnFIE_mat_vfree()
        ' 次元3のベクトル v を確保
        Dim v As FVECTOR_PTR = FVECTOR_PTR.Zero

        Try
            v = api.fnFIE_mat_valloc(3)

            Assert.IsTrue(v <> FVECTOR_PTR.Zero, "エラーが発生しました。")
            ' v を次元10にリサイズ
            Dim status As Integer = api.fnFIE_mat_vrealloc(v, 10)
            Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "エラーが発生しました。({0})", CType(status, f_err))
        Finally
            api.fnFIE_mat_vfree(v)
        End Try
    End Sub
End Class

See Also