ManagedLibraryExpressionID

ManagedLibraryExpressionID[expr]
returns the positive integer ID associated with expr if it is a managed library expression and $Failed otherwise.

ManagedLibraryExpressionID[expr,mname]
only returns the ID if expr is associated with the registered manager having name mname.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Load example LibraryFunction objects that implement a simple linear congruential random generator:

In[1]:=
Click for copyable input

Create an instance of a linear congruential generator:

In[3]:=
Click for copyable input
Out[3]=

Get its unique ID:

In[4]:=
Click for copyable input
Out[4]=

Set its parameters using the unique ID assigned by CreateManagedLibraryExpression:

In[5]:=
Click for copyable input

Generate two pseudorandom numbers from the instance:

In[6]:=
Click for copyable input
Out[6]=
Introduced in 2014
(10.0)