This data object is returned by GeomVertexArrayData::get_handle() or modify_handle().
More...
|
| | clearRows () |
| |
| | copyDataFrom (const GeomVertexArrayDataHandle other) |
| | Copies the entire data array from the other object. More...
|
| |
| | copyDataFrom (object buffer) |
| |
| | copySubdataFrom (int to_start, int to_size, const GeomVertexArrayDataHandle other, int from_start, int from_size) |
| | Copies a portion of the data array from the other object into a portion of the data array of this object. More...
|
| |
| | copySubdataFrom (int to_start, int to_size, object buffer) |
| |
| | copySubdataFrom (int to_start, int to_size, object buffer, int from_start, int from_size) |
| |
| const GeomVertexArrayFormat | getArrayFormat () |
| |
| VectorUchar | getData () |
| | Returns the entire raw data of the GeomVertexArrayData object, formatted as a string. More...
|
| |
| int | getDataSizeBytes () |
| |
| UpdateSeq | getModified () |
| |
| int | getNumRows () |
| |
| GeomVertexArrayData | getObject () |
| |
| const GeomVertexArrayData | getObject () |
| |
| VectorUchar | getSubdata (int start, int size) |
| | Returns a subset of the raw data of the GeomVertexArrayData object, formatted as a string. More...
|
| |
| GeomEnums::UsageHint | getUsageHint () |
| |
| | markUsed () |
| | Marks the array data recently-used. More...
|
| |
| VertexBufferContext | prepareNow (PreparedGraphicsObjects prepared_objects, GraphicsStateGuardianBase gsg) |
| | Creates a context for the data on the particular GSG, if it does not already exist. More...
|
| |
| bool | requestResident () |
| | Returns true if the vertex data is currently resident in memory. More...
|
| |
| bool | reserveNumRows (int n) |
| |
| | setData (VectorUchar data) |
| | Replaces the entire raw data array with the contents of the indicated string. More...
|
| |
| bool | setNumRows (int n) |
| |
| | setSubdata (int start, int size, VectorUchar data) |
| | Replaces a portion of the data array from the indicated string. More...
|
| |
| bool | uncleanSetNumRows (int n) |
| |
| Public Member Functions inherited from ReferenceCount |
| int | getRefCount () |
| | Returns the current reference count. More...
|
| |
| | ref () |
| | Explicitly increments the reference count. More...
|
| |
| bool | testRefCountIntegrity () |
| | Does some easy checks to make sure that the reference count isn't completely bogus. More...
|
| |
| bool | testRefCountNonzero () |
| | Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
|
| |
| bool | unref () |
| | Explicitly decrements the reference count. More...
|
| |
| Public Member Functions inherited from GeomEnums |
| | __init__ () |
| |
| | __init__ (const GeomEnums) |
| |
|
| Public Types inherited from GeomEnums |
| enum | AnimationType { AT_none = 0,
AT_panda = 1,
AT_hardware = 2
} |
| |
| enum | Contents {
C_other = 0,
C_point = 1,
C_clip_point = 2,
C_vector = 3,
C_texcoord = 4,
C_color = 5,
C_index = 6,
C_morph_delta = 7,
C_matrix = 8,
C_normal = 9
} |
| |
| enum | GeomRendering {
GR_indexed_point = 1,
GR_indexed_other = 65536,
GR_indexed_bits = 65537,
GR_point = 2,
GR_point_uniform_size = 4,
GR_per_point_size = 8,
GR_point_perspective = 16,
GR_point_aspect_ratio = 32,
GR_point_scale = 64,
GR_point_rotate = 128,
GR_point_sprite = 256,
GR_point_sprite_tex_matrix = 512,
GR_point_bits = 1022,
GR_triangle_strip = 1024,
GR_triangle_fan = 2048,
GR_line_strip = 4096,
GR_composite_bits = 7168,
GR_strip_cut_index = 131072,
GR_flat_first_vertex = 8192,
GR_flat_last_vertex = 16384,
GR_shade_model_bits = 24576,
GR_render_mode_wireframe = 262144,
GR_render_mode_point = 524288,
GR_adjacency = 1048576
} |
| |
| enum | NumericType {
NT_uint8 = 0,
NT_uint16 = 1,
NT_uint32 = 2,
NT_packed_dcba = 3,
NT_packed_dabc = 4,
NT_float32 = 5,
NT_float64 = 6,
NT_stdfloat = 7,
NT_int8 = 8,
NT_int16 = 9,
NT_int32 = 10,
NT_packed_ufloat = 11
} |
| |
| enum | PrimitiveType {
PT_none = 0,
PT_polygons = 1,
PT_lines = 2,
PT_points = 3,
PT_patches = 4
} |
| |
| enum | ShadeModel { SM_uniform = 0,
SM_smooth = 1,
SM_flat_first_vertex = 2,
SM_flat_last_vertex = 3
} |
| |
| enum | UsageHint {
UH_client = 0,
UH_stream = 1,
UH_dynamic = 2,
UH_static = 3,
UH_unspecified = 4
} |
| |
This data object is returned by GeomVertexArrayData::get_handle() or modify_handle().
As long as it exists, the data is locked; when the last of these destructs, the data is unlocked.
Only one thread at a time may lock the data; other threads attempting to lock the data will block. A given thread may simultaneously lock the data multiple times.
This class serves in lieu of a pair of GeomVertexArrayDataPipelineReader and GeomVertexArrayDataPipelineWriter classes


Hello there! My name is Alex and I'm currently a third-year Computer Science student studying at the University of Waterloo.
I like to solve problems by applying first principles thinking to break down complex issues into manageable sub-problems.
This approach has helped me gain a deeper understanding of concepts and allows me to develop innovative solutions that address the root cause of problems.
My passion for technology has led me to focus on two exciting fields: Machine Learning and Fullstack Web Development. I am eager to explore these areas in greater depth and contribute to the creation of cutting-edge technologies that can positively impact our world.
In addition to my academic pursuits, I like to have philosophical discussions, play chess, snowboard, and go on fishing trips!
Thanks for stopping by and feel free to reach out if you'd like to connect!


Class AssemblyResolver
This is a static Assembly resolver and Assembly loader It takes care of caching and prevents that an Assembly is loaded twice (which would cause issues!)
Inheritance
Namespace:Dapplo.Addons.Bootstrapper.Resolving
Assembly:Dapplo.Addons.Bootstrapper.dll
Syntax
public static class AssemblyResolver : object
Properties
| Improve this Doc View SourceAssemblyCache
IEnumerable with all cached assemblies
Declaration
public static IEnumerable<Assembly> AssemblyCache { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Assembly> |
CheckEmbeddedResourceNameAgainstCache
Defines if before loading an assembly from a resource, the Assembly names from the cache are checked against the resource name. This speeds up the loading, BUT might have a problem that an assembly "x.y.z.dll" is skipped as "y.z.dll" was already loaded.
Declaration
public static bool CheckEmbeddedResourceNameAgainstCache { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Directories
Directories which this AssemblyResolver uses to find assemblies
Declaration
public static IEnumerable<string> Directories { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<System.String> |
Extensions
The extensions used for finding assemblies, you can add your own. Extensions can end on .gz when such a file/resource is used it will automatically be decompresed
Declaration
public static ISet<string> Extensions { get; }
Property Value
| Type | Description |
|---|---|
| ISet<System.String> |
ResolveEmbeddedBeforeFiles
Defines if the resolving is first loading internal files, if nothing was found check the file system There might be security reasons for not doing this.
Declaration
public static bool ResolveEmbeddedBeforeFiles { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceAddDirectory(String)
Add the specified directory, by converting it to an absolute directory
Declaration
public static void AddDirectory(string directory)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | directory | Directory to add for resolving |
FindAssemblies(IEnumerable<String>, IEnumerable<String>)
Find the specified assemblies from a manifest resource or from the file system. It is possible to use wildcards but the first match will be loaded!
Declaration
public static IEnumerable<Assembly> FindAssemblies(IEnumerable<string> assemblyNames, IEnumerable<string> extensions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<System.String> | assemblyNames | IEnumerable with the assembly names, e.g. from AssemblyName.Name, do not specify an extension |
| IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
Returns
| Type | Description |
|---|---|
| IEnumerable<Assembly> | IEnumerable with Assembly |
FindAssembly(String, IEnumerable<String>)
Find the specified assembly from a manifest resource or from the file system. It is possible to use wildcards but the first match will be loaded!
Declaration
public static Assembly FindAssembly(string assemblyName, IEnumerable<string> extensions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | assemblyName | string with the assembly name, e.g. from AssemblyName.Name, do not specify an extension |
| IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly or null |
LoadAssemblyFromFile(String)
Simple method to load an assembly from a file path (or returned a cached version). If it was loaded new, it will be added to the cache
Declaration
public static Assembly LoadAssemblyFromFile(string filepath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filepath | string with the path to the file |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly |
LoadAssemblyFromFileSystem(IEnumerable<String>, String, IEnumerable<String>)
Load the specified assembly from the specified directories, or return null
Declaration
public static Assembly LoadAssemblyFromFileSystem(IEnumerable<string> directories, string assemblyName, IEnumerable<string> extensions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<System.String> | directories | IEnumerable with directories |
| System.String | assemblyName | string with the name without path |
| IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly |
LoadAssemblyFromFileSystem(String, IEnumerable<String>)
Load the specified assembly from the ResolveDirectories, or return null
Declaration
public static Assembly LoadAssemblyFromFileSystem(string assemblyName, IEnumerable<string> extensions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | assemblyName | string with the name without path |
| IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly |
LoadAssemblyFromStream(Stream, CompressionTypes, Boolean)
Simple method to load an assembly from a stream
Declaration
public static Assembly LoadAssemblyFromStream(Stream assemblyStream, CompressionTypes compressionType = CompressionTypes.None, bool checkCache = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | assemblyStream | Stream |
| CompressionTypes | compressionType | specify the compression type for the stream |
| System.Boolean | checkCache | specify if the cache needs to be checked, this costs performance |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly or null when the stream is null |
LoadEmbeddedAssembly(Assembly, String)
Load the specified assembly from an embedded (manifest) resource, or return null
Declaration
public static Assembly LoadEmbeddedAssembly(this Assembly assembly, string resourceName)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly | Assembly to load the resource from |
| System.String | resourceName | Name of the embedded resource for the assembly to load |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly |
LoadEmbeddedAssembly(String, IEnumerable<String>)
Load the specified assembly from a manifest resource, or return null
Declaration
public static Assembly LoadEmbeddedAssembly(string assemblyName, IEnumerable<string> extensions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | assemblyName | string |
| IEnumerable<System.String> | extensions | IEnumerable with extensions to look for, defaults will be set if null was passed |
Returns
| Type | Description |
|---|---|
| Assembly | Assembly |
Register(Assembly, String)
Extension to register an assembly to the AssemblyResolver, this is used for resolving embedded assemblies
Declaration
public static void Register(this Assembly assembly, string filepath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Assembly | assembly | Assembly |
| System.String | filepath | Path to assembly, or null if it isn't loaded from the file system |
RegisterAssemblyResolve()
Register AssemblyResolve on the current AppDomain
Declaration
public static IDisposable RegisterAssemblyResolve()
Returns
| Type | Description |
|---|---|
| IDisposable | IDisposable, when disposing this the event registration is removed |
RegisterAssemblyResolve(AppDomain)
Register the AssemblyResolve event for the specified AppDomain This can be called multiple times, it detect this.
Declaration
public static IDisposable RegisterAssemblyResolve(this AppDomain appDomain)
Parameters
| Type | Name | Description |
|---|---|---|
| AppDomain | appDomain |
Returns
| Type | Description |
|---|---|
| IDisposable | IDisposable, when disposing this the event registration is removed |
UnregisterAssemblyResolve()
Unregister AssemblyResolve from the current AppDomain
Declaration
public static void UnregisterAssemblyResolve()
UnregisterAssemblyResolve(AppDomain)
Unregister the AssemblyResolve event for the specified AppDomain This can be called multiple times, it detect this.
Declaration
public static void UnregisterAssemblyResolve(this AppDomain appDomain)
Parameters
| Type | Name | Description |
|---|---|---|
| AppDomain | appDomain |


Discover digital artifacts, exhibits and collections from museums and archives all around the world. Explore cultural treasures in extraordinary detail from hidden gems to great masterpieces. Experiment with open and protected digital cultural content and unlock your creativity!
The WITH is a platform that exposes APIs from different portals and repositories. It allows you to search for digital content from a range of different and unconnected repositories and databases from a single access point. Searchable repositories include Europeana, the Digital Public Library of America, YouTube, Rijks Museum, National Library of Australia, Digital New Zeeland and other.
WITH is available for cultural institutions and organizations, professional users and third party developers in order to easily search for the cultural resources that meet their retrieval criteria so as to collect, use and re-use them to promote innovation and demonstrate the social and economic value of cultural content.
WITH designed and developed in alignment with complementary services used and produced in the Europeana ecosystem, and informed by the design of respective infrastructures being developed such as Europeana Labs , the Europeana Cloud and LoCloud , and of more specialized applications targeting cultural heritage content visualization and re-use, such as the tools and pilots of AthenaPlus and EUscreen.
Digital cultural artifacts, exhibitions and collections are available, and you can build your own space of favorites: log in and start creating!


Line 1 in div 1
Line 2 in div 1
Line 3 in div 1
Line 4 in div 1
Line 5 in div 1
Line 1 in div 2
Line 2 in div 2
Line 1 in div 3
Line 2 in div 3


| FLOCK(2) | Linux Programmer's Manual | FLOCK(2) |
int flock(int fd, int operation);
A call to flock() may block if an incompatible lock is held by another process. To make a nonblocking request, include LOCK_NB (by ORing) with any of the above operations.
A single file may not simultaneously have both shared and exclusive locks.
Locks created by flock() are associated with an open file description (see open(2)). This means that duplicate file descriptors (created by, for example, fork(2) or dup(2)) refer to the same lock, and this lock may be modified or released using any of these file descriptors. Furthermore, the lock is released either by an explicit LOCK_UN operation on any of these duplicate file descriptors, or when all such file descriptors have been closed.
If a process uses open(2) (or similar) to obtain more than one file descriptor for the same file, these file descriptors are treated independently by flock(). An attempt to lock the file using one of these file descriptors may be denied by a lock that the calling process has already placed via another file descriptor.
A process may hold only one type of lock (shared or exclusive) on a file. Subsequent flock() calls on an already locked file will convert an existing lock to the new lock mode.
Locks created by flock() are preserved across an execve(2).
A shared or exclusive lock can be placed on a file regardless of the mode in which the file was opened.
flock() places advisory locks only; given suitable permissions on a file, a process is free to ignore the use of flock() and perform I/O on the file.
flock() and fcntl(2) locks have different semantics with respect to forked processes and dup(2). On systems that implement flock() using fcntl(2), the semantics of flock() will be different from those described in this manual page.
Converting a lock (shared to exclusive, or vice versa) is not guaranteed to be atomic: the existing lock is first removed, and then a new lock is established. Between these two steps, a pending lock request by another process may be granted, with the result that the conversion either blocks, or fails if LOCK_NB was specified. (This is the original BSD behavior, and occurs on many other implementations.)
Since Linux 2.6.12, NFS clients support flock() locks by emulating them as fcntl(2) byte-range locks on the entire file. This means that fcntl(2) and flock() locks do interact with one another over NFS. It also means that in order to place an exclusive lock, the file must be opened for writing.
Since Linux 2.6.37, the kernel supports a compatibility mode that allows flock() locks (and also fcntl(2) byte region locks) to be treated as local; see the discussion of the local_lock option in nfs(5).
Documentation/filesystems/locks.txt in the Linux kernel source tree (Documentation/locks.txt in older kernels)
| 2017-09-15 | Linux |


Implementation of Cumulocity bootstrap process. More...
#include <srbootstrap.h>
Public Member Functions | |
| SrBootstrap (const std::string &server, const std::string &deviceID) | |
| SrBootstrap constructor. More... | |
| const std::string & | tenant () const |
| Get the Cumulocity tenant the device registered to. | |
| const std::string & | username () const |
| Get the received device username. | |
| const std::string & | password () const |
| Get the received device password. | |
| virtual int | bootstrap (const std::string &path) |
| Reference implementation of the bootstrap process. More... | |
Protected Member Functions | |
| virtual int | loadCredential (const std::string &path) |
| Load device credential. It will be called first by bootstrap. More... | |
| virtual int | requestCredential () |
| Request credential from Cumulocity. It will be called when loadCredential failed. More... | |
| virtual int | saveCredential (const std::string &path) |
| Save credential to storage when requestCredential succeeded. More... | |
Protected Attributes | |
| const std::string | _server |
| std::string | _tenant |
| std::string | _username |
| std::string | _password |
| const std::string | _deviceID |
Implementation of Cumulocity bootstrap process.
Bootstrap (or register) to Cumulocity is the process of requesting a device credential from the Cumulocity server or load the stored credential if the credential is already acquired earlier.
|
inline |
SrBootstrap constructor.
| server | Cumulocity server URL (no trailing slash). |
| deviceID | unique device ID (e.g., IMEI) for bootstrapping. |
|
virtual |
Reference implementation of the bootstrap process.
This function will be invoked by SrAgent to perform bootstrap during agent start-up. If you have special requirements, please subclass SrBootstrap and overwrite this function.
| path | path to store and load device credential. |
|
protectedvirtual |
Load device credential. It will be called first by bootstrap.
| path | path specifies the credential location. |
|
protectedvirtual |
Request credential from Cumulocity. It will be called when loadCredential failed.
|
protectedvirtual |
Save credential to storage when requestCredential succeeded.
| path | path specifies the location for storing credentials. |


Weathermaster:
Golem.
Ultimate Golem Spartacus Operation Rate: 1/100
Guardian Golem Operation Rate: 85%
Outer Bulkhead: Open
Internal Safeguard: Slow Field: In Operation
Internal Safeguard: Damage Field: In Operation
Return to menu.


Plugin Information |
|---|
View BuildContext Capture on the plugin site for more information. |
This plugin makes it possible to capture the build context to ensure traceability and auditability.
Introduction
Knowing build information is indispensable to keep traceability. Build information enables use to reproduce the build process and deployment process on demand.
This plugin enables you to capture the build context by defining several predefined captured types and lets you define some custom capture elements (from script execution).
After the capture, you are able to export the build context and attach it to your artifacts.
Features
- Captures build context used by a build
- Knows build context elements used for each job run
Some use cases
- To capture environment variables used by the build
Note: It is suggested to use EnvInject plugin for managing environment variables
and there is a connector between EnvInject plugin and BuildContextCapture plugin. - To capture the build log
- To capture infrastructure information (plugins information, jenkins version, and so on)
- To capture the job configuration file (config.xml)
- To execute a script and capture any recorded file from the build
Note: For example, you can execute the cleartool command 'setcs' to capture the Clearcase config spec of your project used by the build.
Changelog
0.6
* Fix JENKINS-14822 - Jenkins BuildContext Capture Plug-in's configuration wizard gets duplicated
0.5
* Add a build action and a project action
0.4
* Add build time type
* Introduce a BuildContextCapture publisher type
0.3
* Add the ability to capture elements through a script
0.2
* Add support of different exported format
0.1
* Initial version


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.crypto.EncryptedPrivateKeyInfo
public class EncryptedPrivateKeyInfo
This class implements the EncryptedPrivateKeyInfo
type
as defined in PKCS #8.
Its ASN.1 definition is as follows:
EncryptedPrivateKeyInfo ::= SEQUENCE { encryptionAlgorithm AlgorithmIdentifier, encryptedData OCTET STRING } AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL }
PKCS8EncodedKeySpec
| Constructor Summary | |
|---|---|
EncryptedPrivateKeyInfo(AlgorithmParameters algParams,
byte[] encryptedData)
Constructs an EncryptedPrivateKeyInfo from the
encryption algorithm parameters and the encrypted data. |
|
EncryptedPrivateKeyInfo(byte[] encoded)
Constructs (i.e., parses) an EncryptedPrivateKeyInfo from
its ASN.1 encoding. |
|
EncryptedPrivateKeyInfo(String algName,
byte[] encryptedData)
Constructs an EncryptedPrivateKeyInfo from the
encryption algorithm name and the encrypted data. |
| Method Summary | |
|---|---|
String |
getAlgName()
Returns the encryption algorithm. |
AlgorithmParameters |
getAlgParameters()
Returns the algorithm parameters used by the encryption algorithm. |
byte[] |
getEncoded()
Returns the ASN.1 encoding of this object. |
byte[] |
getEncryptedData()
Returns the encrypted data. |
PKCS8EncodedKeySpec |
getKeySpec(Cipher cipher)
Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it. |
PKCS8EncodedKeySpec |
getKeySpec(Key decryptKey)
Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it. |
PKCS8EncodedKeySpec |
getKeySpec(Key decryptKey,
Provider provider)
Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it. |
PKCS8EncodedKeySpec |
getKeySpec(Key decryptKey,
String providerName)
Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncryptedPrivateKeyInfo(byte[] encoded) throws IOException
EncryptedPrivateKeyInfo
from
its ASN.1 encoding.
encoded
- the ASN.1 encoding of this object. The contents of
the array are copied to protect against subsequent modification.
NullPointerException
- if the encoded
is null.
IOException
- if error occurs when parsing the ASN.1 encoding.public EncryptedPrivateKeyInfo(String algName, byte[] encryptedData) throws NoSuchAlgorithmException
EncryptedPrivateKeyInfo
from the
encryption algorithm name and the encrypted data.
Note: This constructor will use null as the value of the algorithm parameters. If the encryption algorithm has parameters whose value is not null, a different constructor, e.g. EncryptedPrivateKeyInfo(AlgorithmParameters, byte[]), should be used.
algName
- encryption algorithm name. See Appendix A in the
Java Cryptography Extension Reference Guide
for information about standard Cipher algorithm names.encryptedData
- encrypted data. The contents of
encrypedData
are copied to protect against subsequent
modification when constructing this object.
NullPointerException
- if algName
or
encryptedData
is null.
IllegalArgumentException
- if encryptedData
is empty, i.e. 0-length.
NoSuchAlgorithmException
- if the specified algName is
not supported.public EncryptedPrivateKeyInfo(AlgorithmParameters algParams, byte[] encryptedData) throws NoSuchAlgorithmException
EncryptedPrivateKeyInfo
from the
encryption algorithm parameters and the encrypted data.
algParams
- the algorithm parameters for the encryption
algorithm. algParams.getEncoded()
should return
the ASN.1 encoded bytes of the parameters
field
of the AlgorithmIdentifer
component of the
EncryptedPrivateKeyInfo
type.encryptedData
- encrypted data. The contents of
encrypedData
are copied to protect against
subsequent modification when constructing this object.
NullPointerException
- if algParams
or
encryptedData
is null.
IllegalArgumentException
- if encryptedData
is empty, i.e. 0-length.
NoSuchAlgorithmException
- if the specified algName of
the specified algParams
parameter is not supported.| Method Detail |
|---|
public String getAlgName()
Note: Standard name is returned instead of the specified one in the constructor when such mapping is available. See Appendix A in the Java Cryptography Extension Reference Guide for information about standard Cipher algorithm names.
public AlgorithmParameters getAlgParameters()
public byte[] getEncryptedData()
public PKCS8EncodedKeySpec getKeySpec(Cipher cipher) throws InvalidKeySpecException
cipher
needs
to be initialized to either Cipher.DECRYPT_MODE or
Cipher.UNWRAP_MODE, with the same key and parameters used
for generating the encrypted data.
cipher
- the initialized cipher object which will be
used for decrypting the encrypted data.
NullPointerException
- if cipher
is null.
InvalidKeySpecException
- if the given cipher is
inappropriate for the encrypted data or the encrypted
data is corrupted and cannot be decrypted.public PKCS8EncodedKeySpec getKeySpec(Key decryptKey) throws NoSuchAlgorithmException, InvalidKeyException
decryptKey
- key used for decrypting the encrypted data.
NullPointerException
- if decryptKey
is null.
NoSuchAlgorithmException
- if cannot find appropriate
cipher to decrypt the encrypted data.
InvalidKeyException
- if decryptKey
cannot be used to decrypt the encrypted data or the decryption
result is not a valid PKCS8KeySpec.public PKCS8EncodedKeySpec getKeySpec(Key decryptKey, String providerName) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException
decryptKey
- key used for decrypting the encrypted data.providerName
- the name of provider whose Cipher
implementation will be used.
NullPointerException
- if decryptKey
or providerName
is null.
NoSuchProviderException
- if no provider
providerName
is registered.
NoSuchAlgorithmException
- if cannot find appropriate
cipher to decrypt the encrypted data.
InvalidKeyException
- if decryptKey
cannot be used to decrypt the encrypted data or the decryption
result is not a valid PKCS8KeySpec.public PKCS8EncodedKeySpec getKeySpec(Key decryptKey, Provider provider) throws NoSuchAlgorithmException, InvalidKeyException
decryptKey
- key used for decrypting the encrypted data.provider
- the name of provider whose Cipher implementation
will be used.
NullPointerException
- if decryptKey
or provider
is null.
NoSuchAlgorithmException
- if cannot find appropriate
cipher to decrypt the encrypted data in provider
.
InvalidKeyException
- if decryptKey
cannot be used to decrypt the encrypted data or the decryption
result is not a valid PKCS8KeySpec.public byte[] getEncoded() throws IOException
IOException
- if error occurs when constructing its
ASN.1 encoding.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


Shoot For The Stars
Full screen video landing page
Read More
About
Simeon Raykov
Follow Me On Social Media


We will contact you to schedule your free class or
you can call us at<PHONE_NUMBER>
We look forward to seeing you!!!


Pre-alpha development versions of some VR Tetris games. Posted here to share with the A-Frame Dev community, but not ready for wider sharing yet.
Eventual target platform is Oculus Quest 2 (and in theory all other Web XR compatible devices, but Oculus Quest 2 is all I'm planning to test on).
Controller support is still a work-in-progress. So right now, games are only playable in a browser with an attached keyboard.
Game modes available today:
2D Tetris - The classic game.
3D Tetris - A 3D version of Tetris. Very hard to play using keyboard controls. I'm hoping that adding Oculus controllers makes the rotation controls more intuitive. The ability to inspect the play area from all sides should also make a big difference.
2D "Pentris" - Like classic 2D Tetris, but with all possible 5-block tiles. This is much harder! But with a bit of practice and familiarity with the new shapes, it's quite playable. Being able to see the "next block" would be a big help - I'm working on it!
All game modes use the same Javascript Engine, and the differences amount to a couple of lines of HTML.
My hope is to make almost all aspects of the game customizable using HTML only.
If you are in the A-Frame Dev community, and have any comments/questions, please reach out to Diarmid on Slack/Discord
Anyone else with comments/questions, you can get in touch via twitter @dhmackenzie


Application Last Date Evaluated
Security Policy Violations 0-7 Days
Application Name
Evaluation Date
Stage
Security Policy Violations 8-30 Days
Application Name
Evaluation Date
Stage
Security Policy Violations 31-60 Days
Application Name
Evaluation Date
Stage
Security Policy Violations over 60 Days
Application Name
Evaluation Date
Stage


1.
Diagram of the VisRecog Mind-Module
/^^^^^^^^\ VisRecog Finds Direct Object for a Verb /^^^^\ / EYE \ ____________ / EAR \ / \ / Sentence \ / \ | | | | ( "I SEE A..." ) | auditory | | _______ | | | \____________/ | memory | | / BIRD \ | | | | | channel | | / image \--|----+ ______V________ | | | \ engram / | a|c|f / \ | | | \_______/ | b|o|i ( VerbPhrase ) | | | | s|n|b \_______________/ | | | visual | t|c|e | | \ | | | | r|e|r | __V_____ \________ | | | memory | a|p|s | / \ / \ | | | | c|t| | ( VisRecog ) (NounPhrase) | | | channel | t| | | \________/ \________/ | | | | | | __V______ | | | "I" | | ______ | | | ( English ) | | | | | / \ | | | \ Verbs /---|-------|---------|- "SEE" | | / new \ | | | \_____/ | | | | | / percept \ | |_|_ __V_______V____ | "A" | | \ of / | / \ / \ | | | \ BIRD /--|-\ Psy /-------( English Nouns )---|- "BIRD" | | \______/ | \___/ \_______________/ | |
2. Purpose of the VisRecog Mind-Module
The VisRecog module for Visual Recognition integrates a robotic visual system with the thinking structures of the AI Mind.
Before vision is actually implemented for robot embodiment, VisRecog says by default: I SEE NOTHING.
4. Code of VisRecog() from ghost327.pl AI
source code in
Perl
# The visual recognition module in the Perlmind for robots # when fully implemented will serve the purpose of letting # AI Minds dynamically describe what they see in real time # instead of fetching knowledge from the AI knowledge base. sub VisRecog() { # http://ai.neocities.org/VisRecog.html # 2016jan22: NOTHING = default answer for "What do you see?" # http://medium.com/p/12c25b2570b2 -- How Strong AI recognizes an image # 2017-04-10: http://ai.neocities.org/VisRecog.gif -- animated VisRecog if ($hlc == 1) { #2018-09-27: separate code for English and Russian... if ($svo4 == 0) { # 2017-04-11: if no direct object is available; for (my $i=$t; $i>$midway; $i--) { # 2018-09-27: search for 760=NOTHING my @k=split(',',$psy[$i]); # 2018-09-27: examine @psy array; if ($k[1] == 760) { # 2017-06-08: if psi 760=NOTHING is found; $aud = $k[20]; # 2019-08-01: "NOTHING" recall-vector for Speech() last; # 2017-04-11: exit from loop; } # 2017-04-11: End of search for 760=NOTHING; } # 2017-04-11: End of search loop from $t back to $midway. } # 2017-04-11: end of test for a noun to fill in "I SEE ____". } # 2017-06-30: end of test for English thinking. if ($hlc == 3) { #2018-09-27: separate code for English and Russian... # 2017-06-30: Russian search for "1228=НИЧЕГО" or "NOTHING" if ($svo4 == 0) { # 2017-06-30: if no direct object is available; for (my $i=$t; $i>$midway; $i--) { # 2017-06-30: search for 1228=НИЧЕГО my @k=split(',',$psy[$i]); # 2017-06-30: examine @psy array; if ($k[1] == 1228) { # 2017-06-30: if psi 1228=NOTHING is found; $nphrpos = $k[6]; # 2017-09-03: set for EnArticle. $aud = $k[20]; # 2019-08-01: "NOTHING" recall-vector for Speech() last; # 2017-06-30: exit from loop; } # 2017-06-30: End of search for 1228=NOTHING; } # 2017-06-30: End of search loop from $t back to $midway. } # 2017-05-40: end of test for a noun to fill in "I SEE ____". } # 2017-06-30: end of test for Russian thinking. Speech(); # 2017-04-11: speak the word starting at the $aud time. # http://www.starboundliterature.space/visual-art.html } # 2019-08-01: VisRecog returns to Sensorium +/- NLP generation modules.
5.
Variables for the VisRecog Robot Mind-Module
$nphrpos -- "noun-phrase part-of-speech" for testing during the EnThink() process.
$svo4 -- direct object -- item #4 in subject-verb-object.
6. Troubleshooting and Debugging for
AI Mind Maintainers
6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind
Maintainer devises solution.)
7. Future Development of the VisRecog Robot Mind-Module
AI Minds need to be installed in robots with cameras for artificial vision.
Roadmap to Artificial Intelligence
8. Resources for VisRecog (Visual Recognition)
9.
AiTree of Mind-Modules for
Natural Language Understanding


In order to better help you understand how an applicant will see your job, we've included a preview of your information in the format applicants will see it in. At the bottom of this preview you can save and quit, or submit your draft to Talent Cloud for review.
Now that you've seen the job poster as it will appear to applicants, feel free to make any changes you need to make before finalizing the submission. You can return to your dashboard if you'd like to edit things later, head over to the job poster builder if you'd like to make your changes right now, or, if you're happy with the poster as it is, submit it for final review.


Chat color argument
The ChatColorArgument
class is used to represent a given chat color (e.g. red or green)
Example - Username color changing plugin
LinkedHashMap<String, Argument> arguments = new LinkedHashMap<>();
arguments.put("chatcolor", new ChatColorArgument());
CommandAPI.getInstance().register("namecolor", arguments, (sender, args) -> {
Player player = (Player) sender;
ChatColor color = (ChatColor) args[0];
player.setDisplayName(color + player.getDisplayName());
});
Chat component argument
Developer's Note:
The ChatComponentArgument
class is dependent on a Spigot based server. This means that the ChatComponentArgument
will not work on a non-Spigot based server, such as CraftBukkit. If you use this class on a non-Spigot based server, it will throw a SpigotNotFoundException
Spigot based servers include, but are not limited to:
- Spigot
- PaperSpigot
- TacoSpigot
The ChatComponentArgument
class accepts raw JSON as valid input. This is converted into Spigot's BaseComponent[]
which can be used for books and raw messages. You can read more about raw JSON here.
Example - Book made from raw JSON
LinkedHashMap<String, Argument> arguments = new LinkedHashMap<>();
arguments.put("contents", new ChatComponentArgument());
CommandAPI.getInstance().register("makebook", arguments, (sender, args) -> {
if (sender instanceof Player) {
Player player = (Player) sender;
BaseComponent[] arr = (BaseComponent[]) args[0];
ItemStack is = new ItemStack(Material.WRITTEN_BOOK);
BookMeta meta = (BookMeta) is.getItemMeta();
meta.spigot().addPage(arr);
is.setItemMeta(meta);
player.getInventory().addItem(is);
}
});


Scholars around the world had been studying for decades the strange, moving images they found strewn around what was left of the World Wide Web. Unsure of what the incomprehensible glyphs meant, they were sure that they held the key to understanding the people who populated the Internet of that time.
It wasn't until one brilliant linguist, Dr Susanof Flicklebiers, cracked the code, and started extracting meaning from what she called "Hierogifs" that the world could really understand what people were saying to each other when the world was dominated by online communication.
It was less than complimentary.


Distributed systems
3. Processes
Processes
Process - program in execution
-
management and scheduling of processes - important tasks for an operating systems
-
besides management and scheduling distributed systems have other issues
-
threads - play a crucial role in obtaining performance
in multicore and multiprocessor environments
-
virtualization - plays a significant role for concurrency
by allowing entire environment (including the operating system) to
work independently
-
Process migration or code migration helps
achieving scalability in distributed systems.
Processes
- question: How operating system executes a program?
- virtual processor - one created for each programm
- process table - keeps track of these virtual processors
-
storing process context containing entries for storing CPU
register values, memory maps, open files, privileges, etc.
-
operating system takes great care to ensure that processes don't
affect each other in an unexpected way
Threads
-
Concurrency transparency using processes is costly
-
Threads are solutions for achieving concurrency with lower overhead
-
Thread system maintains only minimal information to allow CPU to be
shared by several threads
-
threads allow blocking some system calls without blocking entire process
in which threads are running.
Threads
-
implementing of threads at the user level
also called many-to-one threading model
-
drawback -
multiple threads mapped to a single schedulable entity
-
problem: invocation of blocking system calls will blocks entire process
to which thread belongs
-
implementing threads in the operating system kernel
-
drawback - switching thread contexts as expensive as
switching process contexts
Threads
-
nevertheless using threads is only one way how to organize
simultaneous and concurrent executions
-
alternative way: applications are often constructed as a
collection of concurrent processes
-
example - Apache Web Server
- group of processes
- each process forms a single-threaded instantiation of the server
- thread programming is difficult because the developer is fully responsible for
managing concurrent access to shared data
- processes, on the other hand, are protected by hardware support
- access data outside allocated memory
Threads in distributed systems
-
way of making processes less blocking
-
expressing communications in the form of maintaining
more logical connections at the same time
-
Multithreaded clients
-
Multithreaded servers
Threads in Java
-
In java threads can be created in one of two ways:
- by extending Thread class
- by implementing Runnable interface
Extending of the Thread class
public class ThreadExample extends Thread {
@Override
public void run(){
// thread body
}
}
a thread is created and run by the following command:
Thread newThread = ThreadExample();
newThread.start();
- the other way to start thread: newThread.run();
is "wrong" because it starts thread in the current thread - this can be a
question in Java interviews
Thread.sleep() method
- this method is used to pause the execution of current thread for specified
time in miliseconds
- the actual time thread sleeps depends on system timers and schedulers
- if the system is more busy it will be more
public class ThreadSleepExample {
public static void main(String[] args) throws InterruptedException {
long start = System.currentTimeMillis();
Thread.sleep(2000);
System.out.println("Sleep time in ms = "+
(System.currentTimeMillis()-start));
}
}
Implementing Runnable interface
public class RunnableExample implements Runnable {
public void run(){
// thread body
}
//other methods and fields
public static void main(String[] args) {
new Thread(new RunnableExample()).start();
}
}
creating and starting thread different from the extending thread
Threads - examples in Java
-
Task1: Write a JAVA program which starts 10 threads and
prints their Ids from the run method.
-
Task2: Solve the problem from the task 1 using
Runnable implementation.
10 threads with extending Thread
public class ThreadExample1 extends Thread{
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
}
public static void main(String[] args) {
for (int i=0; i< 10; i++) {
(new ThreadExample1()).start();
}
}
}
threads are simply created and started
Solution: 10 threads in a dynamic array
public class ThreadExample1 extends Thread{
public static List<Thread> threads = new ArrayList<Thread>();
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
}
for (int i=0; i< 10; i++) {
Thread newThread =new ThreadExample1();
newThread.start();
threads.add(newThread);
}
}
Amdahl's law
- one CPU $$T_1 = t_s + T_p$$
- n CPUs $$T_n = t_s + \frac{T_p}{n} \ge t_s$$
- speedup $$S = \frac{T_1}{T_n} $$
- speedup $$S = \frac{1}{(1-p) + \frac{p}{N}}$$
example: theoretialy speedup is limited to at most 20 times if
0.95% of the program can be parallelized


Rupert Grint recalls seeing 'sparks' between Emma Watson and Tom Felton on 'Harry Potter' set
by Nate DayRupert Grint is serving up a juicy behind-the-scenes memory from his days as a star of the "Harry Potter" franchise.
The actor, who will next star in "The Servant" for Apple TV+, told Entertainment Tonight that he remembers "sparks" flying between his co-stars Emma Watson and Tom Felton.
"There was always something (between Watson and Felton)," Grint, 31, said. "There was a little bit of a spark."
WHY CHRISTIAN BALE TURNED DOWN A FOURTH 'BATMAN' FILM
Grint, despite hoping not to start any rumors, admitted that there "were some sparks" between the two actors.
"But we were kids. It was like any kind of playground romance," he said.
Grint describes his time on set, however, as "spark-free."
HALLE BERRY INJURED ON SET OF MMA FILM 'BRUISED'
He also admitted to not watching any of the eight "Harry Potter" films during his time working on them; only recently did he watch "Harry Potter and the Sorcerer's Stone."
"You watch us grow up through all the awkward teenage stages, and it's not something that I've ever really wanted to revisit," Grint confessed as to why he'd never seen any of them. "It was a great experience, and I've got great memories."
CLICK HERE TO GET THE FOX NEWS APP
The "Snatch" star also discussed the possibility of a "Harry Potter" reboot.
"It was an amazing period of our lives, but I don't think any of us would be keen to jump back into it just yet," he admitted. "But never say never."


DAILY ROMAN MISSAL
St Paul Communications
Daughters of St Paul
Version 1.00
Introductory Rites
Prayer Texts
Readings
Prayers of the Faithful
Offertory
Prefaces
Eucharistic Prayer
I II III IV Additional
Communion Rite
Communion Outside Mass
Communion Sick
Index Celebrations [by dates]
Liturgical Calendar
Appendix
Treasury Prayers


Ellipsoid tubes, tubes by instant of time and their projections
Definition. For any regularization matrix the quadratically regularized alternated reach set of system with uncertainty is
Note that if system doesn’t have uncertainty then .
By and denote tight external and internal approximations along good direction such as . Then the reach set by instant of time can be described as
where is the external ellipsoidal tube by instant of time.
Similar approxiamtion can be calculated with the internal ellipsoidal tube by instant of time :
Note that in general case ellipsoidal tube is not tight approximation. For more information see [GAG2012].
So, all in all, there are two types of ellipsoid tube objects that we can work with using Ellipsoidal Toolbox:
- ellipsoidal tubes that are described in gras.ellapx.smartdb.rels.EllTube class;
- tubes by instant of time described in gras.ellapx.smartdb.rels.EllUnionTube class
(see formula).
These two type of objects can be projected on specified subspaces. The projections of ellipsoid tubes can be either static or dynamic. The are described in gras.ellapx.smartdb.rels.EllTubeProj class. As for the tubes by instant of time, they can only be projected on static subspaces. These projections are described in gras.ellapx.smartdb.rels.EllUnionTubeStaticProj class. For more information about these types of projections and their differences and for examples see this link.
Ellipsoid tubes
There is a whole variety of operations upon ellipsoid tubes in Ellipsoidal Toolbox. We can, of course, create them. When the ellipsoid tube object is created, we can cut them, concatenate, interpolate, plot and project them and so on.
The instruments to create ellipsoid tube objects are several functions:
- fromQArrays method creates nEllTubes ellipsoid tube objects using an array of ellipsoid matrices and an array of ellipsoid centers specified at any point of time from timeVec;
- fromQMArrays method acts the same way as fromQArrays method, except for this one requires to specify an array of regularization marices specified at any point of time from timeVec;
- fromQMScaledArrays method acts the same way as fromQMArrays method, except for this one requires to also specify a vector of scale factors specified for every created ellipsoid tube;
- fromEllArray method creates ellipsoid tube object using an array of ellipsoids;
- fromEllMArray method creates ellipsoid tube object using an array of ellipsoids and an array of regularisation matrices.
Basically we can divide these methods into two groups, based od what objects they are using to create ellipsoid tube: an array of ellipsoid matrices with an array of ellipsoid centers (by using these methods we can create an ellipsoid tube object containing several ellipsoid tubes) or an array of ellipsoids (by using these methods we can create an ellipsoid tube object containing one ellipsoid tube). To illustrate the usage of these methods we have to describe several functions, that will be used in the process. Below are their descriptions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 | % This function returns the values of arguments, that are the same for
% FROMQARRAYS, FROMQMARRAYS and FROMQMSCALEDARRAYS methods of creating an
% ellipsoid tube object. Basically, this function creates a set of
% arguments nessesary for creating an ellipsoid tube object containing
% nTubes ellipsoid tubes. Here nTubes is a random natural number in the
% range from one to ten.
%
function [nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = getData()
nTubes=randi(10,1);
nPoints=20;
nDims=3;
absTol=0.001;
relTol=0.001;
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
lsGoodDirVec=[1;0;0];
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
aMat=zeros(nDims,nPoints);
qArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},1,nTubes);
end
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | % This function returns the values of arguments, that specify the type of
% approximation that will be used to create an ellipsoid tube object. It
% will be a random type of approximation (Internal or External). These
% arguments can be used while creating an ellipsoid tube object containing
% one ellipsoid tube or several ellipsoid tubes with the same type of
% approximation.
%
function [approxSchemaDescr, approxSchemaName, approxType] = getSameApprox()
type = randi(2,1);
if type == 1
approxSchemaDescr='Internal';
approxSchemaName='Internal';
approxType=gras.ellapx.enums.EApproxType.Internal;
else
approxSchemaDescr='External';
approxSchemaName='External';
approxType=gras.ellapx.enums.EApproxType.External;
end
end
|
Using the three above mentioned functions we can describe an examples of fromQArrays, fromQMArrays and fromQMScaledArrays methods’ usage.
| % An example of creating nTubes ellipsoid tube objects using fromQArrays
% function with the same type of approximation.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getData();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
fromMatEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | % An example of creating nTubes ellipsoid tube objects using fromQArrays
% function with different types of approximation.
nPoints=10;
absTol=0.01;
relTol=0.01;
approxSchemaDescr={'Internal'; 'External'; 'External'};
approxSchemaName={'Internal'; 'External'; 'External'};
nDims=3;
nTubes=3;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=[gras.ellapx.enums.EApproxType.Internal,...
gras.ellapx.enums.EApproxType.External,...
gras.ellapx.enums.EApproxType.External]';
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
fromMatEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
|
1
2
3
4
5
6
7
8
9
10
11
12
13 | % An example of creating nTubes ellipsoid tube objects using fromQMArrays
% function with the same type of approximation.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getData();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
1,nTubes);
fromMatMEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQMArrays(...
qArrayList, aMat, mArrayList, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | % An example of creating nTubes ellipsoid tube objects using fromQMArrays
% function with different types of approximation.
nPoints=10;
absTol=0.01;
relTol=0.01;
approxSchemaDescr={'Internal'; 'External'; 'External'};
approxSchemaName={'Internal'; 'External'; 'External'};
nDims=3;
nTubes=3;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=[gras.ellapx.enums.EApproxType.Internal,...
gras.ellapx.enums.EApproxType.External,...
gras.ellapx.enums.EApproxType.External]';
mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
1,nTubes);
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
fromMatMEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQMArrays(...
qArrayList, aMat, mArrayList, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | % An example of creating nTubes ellipsoid tube objects using fromQMScaledArrays
% function with the same type of approximation.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getData();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
1,nTubes);
scaleFactor = ones(1,nTubes);
fromQMScaledArraysEllTubeObj = ...
gras.ellapx.smartdb.rels.EllTube.fromQMScaledArrays(...
qArrayList,aMat,mArrayList,timeVec,...
ltGoodDirArray,sTime,approxType,approxSchemaName,...
approxSchemaDescr,absTol, relTol,...
scaleFactor);
|
To use fromEllArray and fromEllMArray methods we nave to describe one more auxiliary function (as these methods create an ellipsoid tube object containing only one ellipsoid tube and we can not use getData function, because it returns data for crating random number of ellipsoid tubes).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | % This function returns the values of arguments, that are needed to use
% FROMELLARRAY and FROMELLMARRAY methods of creating an ellipsoid tube
% object. Basically, this function creates a set of arguments nessesary for
% creating an ellipsoid tube object containing one ellipsoid tube.
%
function [nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = getDataForOneTube()
nTubes=1;
nPoints=20;
nDims=3;
absTol=0.001;
relTol=0.001;
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
lsGoodDirVec=[1;0;0];
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
aMat=zeros(nDims,nPoints);
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,nTubes);
end
|
Now we can write examples of these methods’ usage.
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of creating nTubes ellipsoid tube objects using FROMELLARRAY
% method.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getDataForOneTube();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
ellArray(nPoints) = ellipsoid();
for iElem = 1:nPoints
ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
end;
fromEllArrayEllTubeObj = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
ellArray,timeVec, ltGoodDirArray, sTime, approxType,...
approxSchemaName,approxSchemaDescr, absTol, relTol);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | % An example of creating nTubes ellipsoid tube objects using FROMELLMARRAY.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getDataForOneTube();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
ellArray(nPoints) = ellipsoid();
for iElem = 1:nPoints
ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
end;
mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
1,nTubes);
fromEllArrayEllTubeObj = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
ellArray,timeVec, ltGoodDirArray, sTime, approxType,...
approxSchemaName,approxSchemaDescr, absTol, relTol);
|
As we can see in all these examples, we can specify how many ellipsoid tubes we want to create, which type of arrpoximation to use. Also we can create ellipsoid tube objects, which will contain several ellipsoid tubes with different types of approximation.
After creation of ellipsoid tube objects we can do several operations with them. Below is the getEllTube function that create an ellipsoid tube object containing one or several ellipsoid tubes with specified type of approximation, on specified time vector with specified time points. This function will be used further down to illustrate other methods that we can use while working with ellipsoid tube objects.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | % An example of creating an ellipsoid tube object containing nTubes
% ellipsoid tubes from timeBegin to timeEnd time with specified type of
% approximation.
%
function ellTubeObj = getEllTube(nTubes,timeBeg,timeEnd,type,nPoints)
nDims=3;
absTol=0.001;
relTol=0.001;
timeVec=(timeBeg+1/nPoints):(1/nPoints):timeEnd;
sTime=timeVec(randi(nPoints,1));
lsGoodDirVec=[1;0;0];
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
aMat=zeros(nDims,nPoints);
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,nTubes);
if type == 1
approxSchemaDescr='Internal';
approxSchemaName='Internal';
approxType=gras.ellapx.enums.EApproxType.Internal;
else
approxSchemaDescr='External';
approxSchemaName='External';
approxType=gras.ellapx.enums.EApproxType.External;
end
ellTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
end
|
As we have created an ellipsoid tube object, we can get all the types of differet data about it. There is a set of methods that can give information about the data stored in the object and give access to it.
| % An example of GETDATA method's usage.
nTubes=5;
nPoints = 100;
timeBeg=0;
timeEnd=1;
type = 2;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
data = ellTubeObj.getData();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of GETELLARRAY method's usage.
[nTubes, nPoints, nDims, absTol, relTol, timeVec,...
sTime, lsGoodDirVec, ltGoodDirArray, aMat, qArrayList] = ...
gras.ellapx.smartdb.test.examples.getDataForOneTube();
[approxSchemaDescr, approxSchemaName, approxType] = ...
gras.ellapx.smartdb.test.examples.getSameApprox();
ellArray(nPoints) = ellipsoid();
for iElem = 1:nPoints
ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
end;
fromEllArrayEllTubeObj = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
ellArray,timeVec, ltGoodDirArray, sTime, approxType,...
approxSchemaName,approxSchemaDescr, absTol, relTol);
data = fromEllArrayEllTubeObj.getEllArray(approxType);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98 | nTubes=5;
nPoints = 100;
timeBeg=0;
timeEnd=1;
type = 2;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
%
% get the list of field descriptions
%
descr = ellTubeObj.getFieldDescrList();
%
% get for given field a nested logical/cell array containing is-null
% indicators for cell content. For example, for approxSchemaName field.
%
isNull = ellTubeObj.getFieldIsNull('approxSchemaName');
%
% get for given field logical vector determining whether value of this
% field in each cell is null or not. For example, for approxSchemaName field.
%
valueIsNull = ellTubeObj.getFieldIsValueNull('approxSchemaName');
%
% get the list of field names
%
name = ellTubeObj.getFieldNameList();
%
% project object with specified fields. For example, with fields that are
% not to be cut or concatenated.
%
nameList = ellTubeObj.getNoCatOrCutFieldsList();
proj = ellTubeObj.getFieldProjection(nameList);
%
% get the list of field types
%
type = ellTubeObj.getFieldTypeList();
%
% get the list of field type specifications. Field type specification is a
% sequence of type names corresponding to field value types starting with
% the top level and going down into the nested content of a field (for a
% field having a complex type).
%
typeSpec = ellTubeObj.getFieldTypeSpecList();
% or
typeSpec = ellTubeObj.getFieldTypeSpecList(nameList);
%
% get a matrix composed from the size vectorsfor the specified fields
%
valueSizeMat = ellTubeObj.getFieldValueSizeMat(nameList);
%
% get a vector indicating whether a particular field is composed of null
% values completely
%
valueNull = ellTubeObj.getIsFieldValueNull(nameList);
%
% get a size vector for the specified dimensions. If no dimensions are
% specified, a size vector for all dimensions up to minimum dimension is
% returned
minDimensionSize = ellTubeObj.getMinDimensionSize();
%
% get a minimum dimensionality for a given object
%
minDimensionality = ellTubeObj.getMinDimensionality();
%
% get a number of elements in a given object
%
nElems = ellTubeObj.getNElems();
%
% get a number of fields in a given object
%
nFiedls = ellTubeObj.getNFields();
%
% get a number of tuples in a given object
%
nTuples = ellTubeObj.getNTuples();
%
% get sort index for all tuples of given relation with respect to some of
% its fields
%
sortIndex = ellTubeObj.getSortIndex(nameList);
% also we can specify the direction of sorting ('asc' or 'desc')
sortIndex = ellTubeObj.getSortIndex(nameList,'Direction','asc');
%
% get tuples with given indices from given relation
%
tuples = ellTubeObj.getTuples([1,2,3]);
%
% get tuples from given relation such that afixed index field contains
% values from a given set of value
%
filteredTuples = ellTubeObj.getTuplesFilteredBy('sTime', 1);
%
% get internal representation for a set of unique tuples for given relation
%
uniqueData = ellTubeObj.getUniqueData();
%
% get a relation containing the unique tuples from the original relation
%
uniqueTuples = ellTubeObj.getUniqueTuples();
|
Also we can copy the object, clear all the data, save it in a file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 | nTubes=5;
nPoints = 100;
timeBeg=0;
timeEnd=1;
type = 2;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
%
% get a copy of the object
%
ellCopy = ellTubeObj.getCopy();
%
% delete all the data from the object
%
ellTubeObj.clearData();
ellTubeObj =...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
%
% create a copy of a specified object via calling a copy constructor for
% the object class
%
cloneObj = ellTubeObj.clone();
%
% remove all duplicate tuples from the relation
%
noDuplicate = cloneObj.removeDuplicateTuples();
%
% write a content of relation into Excel spreadsheet file
%
ellTubeObj.writeToCSV('path');
%
% write a content of relation into Excel spreadsheet file
%
fileName = ellTubeObj.writeToXLS('path');
%
% display a content of the given relation as a data grid UI component
%
ellTubeObj.dispOnUI();
%
% put some textual information about object in screen
%
ellTubeObj.display();
|
As we have created the object, we can work with it. Below is the example of concatenating ellipsoid tube objects. We can concatenate objects containing one or several ellipsoid tubes with the same type of approximation.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | % An example of concatenating ellipsoid tube objects containing random
% number of ellipsoid tubes (from one to ten tubes).
%
nTubes = randi(10,1);
nPoints = 20;
type = 1;
timeBeg1 = 0;
timeEnd1 = 1;
firstEllTubeObj =...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg1,timeEnd1,type,nPoints);
timeBeg2 = 1;
timeEnd2 = 2;
secondEllTubeObj =...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg2,timeEnd2,type,nPoints);
%
% Concatenating firstEllTube and secondEllTube on [timeBeg1, timeEnd2]
% vector of time.
%
resEllTubeObj = firstEllTubeObj.cat(secondEllTubeObj);
%
% Concatenating the same firstEllTube and secondEllTube on [timeBeg1,timeEnd2]
% vector of time, but the sTime and values of properties corresponding to
% sTime are taken from secondEllTube.
%
resEllTubeObj = firstEllTubeObj.cat(secondEllTubeObj,'isReplacedByNew',true);
%
% Concatenating the same firstEllTube and secondEllTube on [timeBeg1,timeEnd2]
% vector of time, but the sTime and values of properties corresponding to
% sTime are taken from firstEllTube.
%
resEllTubeObj = firstEllTubeObj.cat(secondEllTubeObj,'isReplacedByNew',false);
%
% Note that we cannot concatenate ellipsoid tubes with overlapping time
% limits.
%
|
As we can concatenate ellipsoid tubes, it is logical to be possible to cut ellipsoid tubes, leaving only part of it at specified vector of time or point of time. Below are the exmples:
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of usage of CUT function from EllTubeBasic class. In
% this example an ellipsoid tube object is created, using TimeVec time
% vector. Then it is cut using cutTimeVec time vector.
%
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
timeVec = ellTubeObj.timeVec{1,:};
cutTimeVec = [timeVec(2) timeVec(7)];
cutVecEllTubeObj = ellTubeObj.cut(cutTimeVec);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of usage of CUT function from EllTubeBasic class. In
% this example an ellipsoid tube object is created, using TimeVec time
% vector. Then it is cut using cutTimePoint point
% of time.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
timeVec = ellTubeObj.timeVec{1,:};
cutTimePoint = timeVec(randi(size(timeVec,2),1));
cutPointEllTubeObj = ellTubeObj.cut(cutTimePoint);
|
After cutting, we can interpolate the resulting tube, using new time vector. Take notice that we have to make sure that the first and the last elements in old and new vectors of time are the same.
1
2
3
4
5
6
7
8
9
10
11
12
13 | % An example of usage of INTERP function. In this example an ellipsoid tube
% object is created, using oldTimeVec time vector. Then it is interpolated
% on newTimeVec time vector.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
newNPoints=50;
newTimeVec = (1/nPoints):(1/newNPoints):1;
interpEllTubeObj = ellTubeObj.interp(newTimeVec);
|
After that we can thin out the new ellipsoid tube, removing ellipsoids at sertain points of time.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | % An example of usage of THINOUTTUPLES method. In this example an ellipsoid
% tube object is created, using TimeVec time vector. Then it is thinned out
% using indVec vector of random indices of elements from timeVec.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
newnPoints=50;
newTimeVec = (1/nPoints):(1/newnPoints):1;
interpEllTubeObj = ellTubeObj.interp(newTimeVec);
indVec = randi(nPoints,1,5);
thinOutEllTubeObj = ellTubeObj.thinOutTuples(indVec);
|
Then we can also calculate new scale factor for specified fields:
1
2
3
4
5
6
7
8
9
10
11
12
13 | % An example of using SCALE method to calculate and set new
% scaleFactor for fields in ellipsoid tube object.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
newnPoints=50;
newTimeVec = (1/nPoints):(1/newnPoints):1;
interpEllTubeObj = ellTubeObj.interp(newTimeVec);
ellTubeObj.scale(@(varargin)2,{});
|
Also we can compare objects using method isEqual.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | % An example ISEQUAL function usage. In it two ellipsoid tube objects are
% created and compared. This is the example of the siplest usage of this
% function with the minimum of input arguments. These ellipsoid tubes are
% not equal because of different lsGoodDirVec vectors.
nPoints=10;
absTol=0.01;
relTol=0.01;
approxSchemaDescr='Internal';
approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
firstEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
lsGoodDirVec=[1;0;0];
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
secondEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
firstEllTubeObj.isEqual(secondEllTubeObj);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | % An example ISEQUAL function usage. In it two ellipsoid tube objects are
% created and compared. These ellipsoid tubes are equal.
nPoints=10;
absTol=0.01;
relTol=0.01;
approxSchemaDescr='Internal';
approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
firstEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
secondEllTubeObj=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
approxSchemaDescr, absTol, relTol);
firstEllTubeObj.isEqual(secondEllTubeObj,'checkFieldOrder',false,...
'checkTupleOrder',false,'maxTolerance',0.0001,...
'maxRelativeTolerance',0.0001);
|
At last there are several methods for projecting ellipsoid tubes on the specified spaces. The first method projects the ellipsoid tube on specified space creating the specified type of projection.
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of calculating ellipsoid tube object projection using PROJECT
% method.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
projType = gras.ellapx.enums.EProjType.Static;
projMat = [1 0; 0 1; 0 0]';
p = @gras.ellapx.smartdb.test.examples.fGetProjMat;
[ellTubeProjObj,indProj2OrigVec] = ellTubeObj.project(projType,...
{projMat},p);
|
The second method projects the ellipsoid tube onto subspace defined by vectors of standart basis with indices specified in indVec.
| % Examples of calculating ellipsoid tube object projection to basic orths
% using PROJECTTOORTHS function. This is an example of projectToOrths usage
% with one input variable. The default value of projection type is used.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
ellTubeProjObj = ellTubeObj.projectToOrths([1,2]);
|
1
2
3
4
5
6
7
8
9
10
11
12 | % Examples of calculating an ellipsoid tube object projection to basic orths
% using PROJECTTOORTHS function. This is an example of projectToOrths usage
% with specified projection type.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
projType = gras.ellapx.enums.EProjType.DynamicAlongGoodCurve;
ellTubeProjObj = ellTubeObj.projectToOrths([1,2], projType);
|
Also there is a method for calculating only static projections.
| % Examples of calculating ellipsoid tube object static projection using
% PROJECTSTATIC function.
nTubes=1;
nPoints = 20;
timeBeg=0;
timeEnd=1;
type = 1;
ellTubeObj=...
gras.ellapx.smartdb.test.examples.getEllTube(nTubes,timeBeg,timeEnd,type,nPoints);
projMat = [1 0; 0 1; 0 0]';
ellTubeProjObj = ellTubeObj.projectStatic(projMat);
|
For creating the projection matrix a special function is used in all of these examples.
| function [projOrthMatArray,projOrthMatTransArray]=...
fGetProjMat(projMat,timeVec,varargin)
nPoints=length(timeVec);
projOrthMatArray=repmat(projMat,[1,1,nPoints]);
projOrthMatTransArray=repmat(projMat.',[1,1,nPoints]);
end
|
Tubes by instant of time
As with ellipsoid tube objects, there are several methods that we can use while working with tubes by instant of time. First of all we can create tubes by instant of time using fromEllTubes method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | % An example of creating EllUnionTube object using FROMELLTUBES method.
aMat = [0 1; 0 0];
bMat = eye(2);
SUBounds = struct();
SUBounds.center = {'sin(t)'; 'cos(t)'};
SUBounds.shape = [9 0; 0 2];
sys = elltool.linsys.LinSysContinuous(aMat, bMat, SUBounds);
x0EllObj = ell_unitball(2);
timeVec = [0 10];
dirsMat = [1 0; 0 1]';
rsObj = elltool.reach.ReachContinuous(sys, x0EllObj, dirsMat, timeVec);
ellTubeObj = rsObj.getEllTubeRel();
unionEllTubeObj = ...
gras.ellapx.smartdb.rels.EllUnionTube.fromEllTubes(ellTubeObj);
|
From here on we will use the getUnion function so we can get a tube by instant of time and work with it further on. As we have created a tubes by instant of time object, we can get all the types of differet data about it. There is a set of methods that can give information about the data stored in the object and give access to it.
| % An example of GETDATA method's usage.
ellUnionObj = gras.ellapx.smartdb.test.examples.getUnion();
data = ellUnionObj.getData();
|
| % An example of GETELLARRAY method's usage.
ellUnionObj = gras.ellapx.smartdb.test.examples.getUnion();
approxType = ellUnionObj.approxType;
data = ellUnionObj.getEllArray(approxType);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 | ellUnionObj = gras.ellapx.smartdb.test.examples.getUnion();
%
% get the list of field descriptions
%
descr = ellUnionObj.getFieldDescrList();
%
% get for given field a nested logical/cell array containing is-null
% indicators for cell content. For example, for approxSchemaName field.
%
isNull = ellUnionObj.getFieldIsNull('approxSchemaName');
%
% get for given field logical vector determining whether value of this
% field in each cell is null or not. For example, for approxSchemaName field.
%
valueIsNull = ellUnionObj.getFieldIsValueNull('approxSchemaName');
%
% get the list of field names
%
name = ellUnionObj.getFieldNameList();
%
% project object with specified fields. For example, with fields that are
% not to be cut or concatenated.
%
nameList = ellUnionObj.getNoCatOrCutFieldsList();
proj = ellUnionObj.getFieldProjection(nameList);
%
% get the list of field types
%
type = ellUnionObj.getFieldTypeList();
%
% get the list of field type specifications. Field type specification is a
% sequence of type names corresponding to field value types starting with
% the top level and going down into the nested content of a field (for a
% field having a complex type).
%
typeSpec = ellUnionObj.getFieldTypeSpecList();
% or
typeSpec = ellUnionObj.getFieldTypeSpecList(nameList);
%
% get a matrix composed from the size vectorsfor the specified fields
%
valueSizeMat = ellUnionObj.getFieldValueSizeMat(nameList);
%
% get a vector indicating whether a particular field is composed of null
% values completely
%
valueNull = ellUnionObj.getIsFieldValueNull(nameList);
%
% get a size vector for the specified dimensions. If no dimensions are
% specified, a size vector for all dimensions up to minimum dimension is
% returned
minDimensionSize = ellUnionObj.getMinDimensionSize();
%
% get a minimum dimensionality for a given object
%
minDimensionality = ellUnionObj.getMinDimensionality();
%
% get a number of elements in a given object
%
nElems = ellUnionObj.getNElems();
%
% get a number of fields in a given object
%
nFiedls = ellUnionObj.getNFields();
%
% get a number of tuples in a given object
%
nTuples = ellUnionObj.getNTuples();
%
% get sort index for all tuples of given relation with respect to some of
% its fields
%
sortIndex = ellUnionObj.getSortIndex(nameList);
% also we can specify the direction of sorting ('asc' or 'desc')
sortIndex = ellUnionObj.getSortIndex(nameList,'Direction','asc');
%
% get tuples with given indices from given relation
%
tuples = ellUnionObj.getTuples([1,2,3]);
%
% get tuples from given relation such that afixed index field contains
% values from a given set of value
%
filteredTuples = ellUnionObj.getTuplesFilteredBy('sTime', 1);
%
% get internal representation for a set of unique tuples for given relation
%
uniqueData = ellUnionObj.getUniqueData();
%
% get a relation containing the unique tuples from the original relation
%
uniqueTuples = ellUnionObj.getUniqueTuples();
|
Also we can copy the object, clear all the data, save it in a file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | ellUnionObj = gras.ellapx.smartdb.test.examples.getUnion();
%
% get a copy of the object
%
ellCopy = ellUnionObj.getCopy();
%
% delete all the data from the object
%
ellUnionObj.clearData();
ellUnionObj = gras.ellapx.smartdb.test.examples.getUnion();
%
% create a copy of a specified object via calling a copy constructor for
% the object class
%
cloneObj = ellUnionObj.clone();
%
% remove all duplicate tuples from the relation
%
noDuplicate = cloneObj.removeDuplicateTuples();
%
% write a content of relation into Excel spreadsheet file
%
ellUnionObj.writeToCSV('path');
%
% write a content of relation into Excel spreadsheet file
%
fileName = ellUnionObj.writeToXLS('path');
%
% display a content of the given relation as a data grid UI component
%
ellUnionObj.dispOnUI();
%
% put some textual information about object in screen
%
ellUnionObj.display();
|
Also we can compare tubes by instant of time using isEqual method.
| % An example of ISEQUAL method usage. The compared ellTubeUnions are not
% equal because one has external approximation, and the other has internal
% approximation.
firstUnionObj = gras.ellapx.smartdb.test.examples.getUnionExt();
secondUnionObj = gras.ellapx.smartdb.test.examples.getUnionInt();
res = firstUnionObj.isEqual(secondUnionObj);
|
At last, as it has already been said tubes by instant of time can be projected only on static subspaces. It can be done in two ways.
| % An example of calculating EllTubeUnion object's projection using PROJECT
% method. For EllTubeUnion objects the type of projection can only be Static.
unionEllTubeObj = ...
gras.ellapx.smartdb.test.examples.getUnion();
projType = gras.ellapx.enums.EProjType.Static;
projMat = [1 0; 0 1]';
p = @gras.ellapx.smartdb.test.examples.fGetProjMat;
[ellTubeProjObj,indProj2OrigVec] = unionEllTubeObj.project(projType,...
{projMat},p);
|
| % Example of PROJECTSTATIC function usage for creating a projection of
% EllTubeUnion object.
unionEllTubeObj = ...
gras.ellapx.smartdb.test.examples.getUnion();
projMatList = {[1 0;0 1]};
statEllTubeProjObj = unionEllTubeObj.projectStatic(projMatList);
|
As for ellipsoid tube projections, a special function is used to create the projection matrix for tubes by instant of time:
| function [projOrthMatArray,projOrthMatTransArray]=...
fGetProjMat(projMat,timeVec,varargin)
nPoints=length(timeVec);
projOrthMatArray=repmat(projMat,[1,1,nPoints]);
projOrthMatTransArray=repmat(projMat.',[1,1,nPoints]);
end
|
Projections of ellipsoid tubes and tubes by instant of time
As it has already been said we can create either static or dynamic projections for ellipsoid tubes and only static projections for tubes by instant of time. There are several methods in Ellipsoidal Toolbox for that. Most of them has already been described:
- project, projectStatic and projectToOrths for ellipsoid tubes;
- project and projectStatic for tubes by instant of time.
It should be mentioned that from here on all the examples are written for ellipsoid tube projections, but their usage is the same for the projections of tubes by instant of time. We wiil use getProj function to create ellipsoid tube projection that we will work with.
As with ellipsoid tubes and tubes by instant of time we can get all the types of differet data about projections. There is a set of methods that can give information about the data stored in the object and give access to it.
| % An example of GETDATA method's usage.
ellTubeProjObj = gras.ellapx.smartdb.test.examples.getProj();
data = ellTubeProjObj.getData();
|
| % An example of GETELLARRAY method's usage.
ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
approxType = ellProjObj.approxType;
data = ellProjObj.getEllArray(approxType);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 | ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
%
% get the list of field descriptions
%
descr = ellProjObj.getFieldDescrList();
%
% get for given field a nested logical/cell array containing is-null
% indicators for cell content. For example, for approxSchemaName field.
%
isNull = ellProjObj.getFieldIsNull('approxSchemaName');
%
% get for given field logical vector determining whether value of this
% field in each cell is null or not. For example, for approxSchemaName field.
%
valueIsNull = ellProjObj.getFieldIsValueNull('approxSchemaName');
%
% get the list of field names
%
name = ellProjObj.getFieldNameList();
%
% project object with specified fields. For example, with fields that are
% not to be cut or concatenated.
%
nameList = ellProjObj.getNoCatOrCutFieldsList();
proj = ellProjObj.getFieldProjection(nameList);
%
% get the list of field types
%
type = ellProjObj.getFieldTypeList();
%
% get the list of field type specifications. Field type specification is a
% sequence of type names corresponding to field value types starting with
% the top level and going down into the nested content of a field (for a
% field having a complex type).
%
typeSpec = ellProjObj.getFieldTypeSpecList();
% or
typeSpec = ellProjObj.getFieldTypeSpecList(nameList);
%
% get a matrix composed from the size vectorsfor the specified fields
%
valueSizeMat = ellProjObj.getFieldValueSizeMat(nameList);
%
% get a vector indicating whether a particular field is composed of null
% values completely
%
valueNull = ellProjObj.getIsFieldValueNull(nameList);
%
% get a size vector for the specified dimensions. If no dimensions are
% specified, a size vector for all dimensions up to minimum dimension is
% returned
minDimensionSize = ellProjObj.getMinDimensionSize();
%
% get a minimum dimensionality for a given object
%
minDimensionality = ellProjObj.getMinDimensionality();
%
% get a number of elements in a given object
%
nElems = ellProjObj.getNElems();
%
% get a number of fields in a given object
%
nFiedls = ellProjObj.getNFields();
%
% get a number of tuples in a given object
%
nTuples = ellProjObj.getNTuples();
%
% get sort index for all tuples of given relation with respect to some of
% its fields
%
sortIndex = ellProjObj.getSortIndex(nameList);
% also we can specify the direction of sorting ('asc' or 'desc')
sortIndex = ellProjObj.getSortIndex(nameList,'Direction','asc');
%
% get tuples with given indices from given relation
%
tuples = ellProjObj.getTuples(1);
%
% get tuples from given relation such that afixed index field contains
% values from a given set of value
%
filteredTuples = ellProjObj.getTuplesFilteredBy('sTime', 1);
%
% get internal representation for a set of unique tuples for given relation
%
uniqueData = ellProjObj.getUniqueData();
%
% get a relation containing the unique tuples from the original relation
%
uniqueTuples = ellProjObj.getUniqueTuples();
|
Also we can copy the object, clear all the data, save it in a file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
%
% get a copy of the object
%
ellCopy = ellProjObj.getCopy();
%
% delete all the data from the object
%
ellProjObj.clearData();
ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
%
% create a copy of a specified object via calling a copy constructor for
% the object class
%
cloneObj = ellProjObj.clone();
%
% remove all duplicate tuples from the relation
%
noDuplicate = cloneObj.removeDuplicateTuples();
%
% write a content of relation into Excel spreadsheet file
%
ellProjObj.writeToCSV('path');
%
% write a content of relation into Excel spreadsheet file
%
fileName = ellProjObj.writeToXLS('path');
%
% display a content of the given relation as a data grid UI component
%
ellProjObj.dispOnUI();
%
% put some textual information about object in screen
%
ellProjObj.display();
|
Also we can compare ellipsoid tube projections using isEqual method.
| % An example of ISEQUAL method usage. The compared ellTubeProjections are
% equal.
firstProjObj = gras.ellapx.smartdb.test.examples.getProj();
secondProjObj = gras.ellapx.smartdb.test.examples.getProj();
res = firstProjObj.isEqual(secondProjObj);
|
And finally we can plot out results using one of three methods: plot, plotExt (for external approximation) or plotInt (for internal approximation).
| % An example of calculating ellipsoid tube object projection using PROJECT
% function.
ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
plObj=smartdb.disp.RelationDataPlotter();
ellProjObj.plot(plObj);
|
| % An example of plotting the projection of the ellipsoid tube internal approximation
% object using PLOTINT method.
ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
ellProjObj.plotInt();
|
| % An example of plotting the projection of the ellipsoid tube external approximation
% object using PLOTEXT method.
ellProjObj = gras.ellapx.smartdb.test.examples.getProj();
ellProjObj.plotExt();
|
All the three methods have several properties connected to the properties of the image, for example: transparency, color, line width and so on.
To read more about the differences of these projections goto. Also there you can find some illustrations for both ellTube projections and ellUnionTube projections.
| [GAG2012] | Gagarinov P.V. 2012. Computation of Alternated Reachability Tubes for Linear Control Systems under Uncertainty. Moscow University Computational Mathematics and Cybernetics, 2012, Vol. 36, No. 4, pp. 169–177. |


Back..
BSD 3-Clause License
BSD 3-Clause License
Copyright (c) 2023, Isabella Dean
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.


A function closure is a function or reference to a function, together with a referencing environment - a table storing a reference to each of the non-local variables even when invoked outside its immediate lexical scope. ("Closure (computer programming)").
Blocks, Procs, and Lambdas are special methods within Ruby. Since Ruby is an Object Orientated Language (OOL), that means most everything is an object...almost everything. The topic for this blog is Blocks, Procs, and Lambdas; below I will break down each show how to use them and some background information about them.
Blocks define an instruction between the curly braces, or between the "do"... "end", which may optionally take an argument and return some values. Basically all that means is a Block is just a bit of code between "do"..."end" or {}. It's not an object on its own, but it can be passed to methods like .each or .map, .zip etc.
1.times do puts "This is a code block!" end
or
1.times {puts "This is another code block!"}
Proc (Procedures) objects are blocks of code that have been bound to a set of local variables. Once bond, the code may be called in different contexts and still access those variables. The difference between a Block and a Proc, Procs are full-fledged objects. So they have all the power and abilities of objects (Blocks do not.). Also unlike blocks, procs can be called over and over without rewriting them. This prevents you from having to retype the contents of your block every time you need to execute a particular bit of code.
Procs are easy to define! You just call Proc.new and pass in the block you want to save.
Cube=Proc.new {|x| x**3}
We can then pass the Procs to a method that would otherwise take a block.
[1,2,3].collect!(&cube)
The "&" is used to convert the cube proc into a block. We'll do this any time we need to pass a proc to a method that expects a block. Lambda is just like a Procs, only it cares about the number of arguments it gets and it returns to its calling method rather than returning immediately. Like Procs, Lambdas are objects, the similarities between the both don't just stop there (with the exception of a bit of syntax and a few behavioral quirks), and they are pretty much identical . . . but do have some key differences.
The First difference between a Lambda and a Procs, a Lambda checks that a number of arguments passed to it, while a Procs does not (mentioned above). This means that a lambda will throw an error if you pass it the wrong number of arguments, whereas a Procs will ignore unexpected arguments and assign "nil" to anything that is missing. The second thing is when a lambda returns, it passes control back to the calling method; when a process returns, it does so immediately, without going back to the calling method. What does that mean? Pretty much a Lambda is just a function without a name.
Lambdas are also easy to create like Procs:
Lambda { | param | block }
Example of lambda:
1 = lambda { "Hello DBC" } puts 1.call
Cited Sources:
"Closure (computer programming)" Wikipedia: The Free Encyclopedia. 26 Jun 2014. Source


About Me
Sweet, you’ve written a few sentences geared toward your ideal audience. Now what? Many people begin by talking all about themselves, when in actuality, your potential readers are more interested in learning about how your site is going to benefit or interest them. Before you get into your personal bio, try to answer these questions
This one is pretty flexible. You could list the big-name sites your content has been shared on, talk about how you have X years of experience in a particular field, OR you can let your readers know that you’re still learning, too, but love to share things as you discover them. This one is pretty flexible. You could list the big-name sites your content has been shared on, talk about how you have X years of experience in a particular field, OR you can let your readers know that you’re still learning, too, but love to share things as you discover them.