Generated by DocFX

Class NpzDictionary<T>

Lazily-loaded collection of arrays from a compressed .npz archive.

Inheritance
System.Object
NpzDictionary<T>
NpzDictionary
Implements
IReadOnlyDictionary<System.String, T>
ICollection<T>
Namespace: ISynergy.Framework.Mathematics.IO.NumPy
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public class NpzDictionary<T> : IDisposable where T : class, ICloneable, IList, ICollection, IEnumerable, IStructuralComparable, IStructuralEquatable
Type Parameters
Name Description
T

The type of the arrays to be loaded.

Constructors

View Source

NpzDictionary(Stream)

Initializes a new instance of the NpzDictionary<T> class.

Declaration
public NpzDictionary(Stream stream)
Parameters
Type Name Description
Stream stream

The stream from where the arrays should be loaded from.

Properties

View Source

Count

Gets the number of elements in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

The count.

View Source

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

true if this instance is read only; otherwise, false.

View Source

IsSynchronized

Gets a value indicating whether the access to collection is synchronized (thread-safe).

Declaration
public bool IsSynchronized { get; }
Property Value
Type Description
System.Boolean
View Source

Item[String]

Gets the array stored under the given key.

Declaration
public T this[string key] { get; }
Parameters
Type Name Description
System.String key

The key.

Property Value
Type Description
T
View Source

Keys

Gets an enumerable collection that contains the keys in the read-only dictionary.

Declaration
public IEnumerable<string> Keys { get; }
Property Value
Type Description
IEnumerable<System.String>

The keys.

View Source

SyncRoot

Gets an object that can be used to synchronize access to the collection.

Declaration
public object SyncRoot { get; }
Property Value
Type Description
System.Object
View Source

Values

Gets an enumerable collection that contains the values in the read-only dictionary.

Declaration
public IEnumerable<T> Values { get; }
Property Value
Type Description
IEnumerable<T>

The values.

Methods

View Source

Add(T)

Throws a .

Declaration
public void Add(T item)
Parameters
Type Name Description
T item
View Source

Clear()

Throws a .

Declaration
public void Clear()
View Source

Contains(T)

Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.

Declaration
public bool Contains(T item)
Parameters
Type Name Description
T item

The object to locate in the System.Collections.Generic.ICollection<T>.

Returns
Type Description
System.Boolean

true if item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

View Source

ContainsKey(String)

Determines whether the read-only dictionary contains an element that has the specified key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
System.String key

The key to locate.

Returns
Type Description
System.Boolean

true if the read-only dictionary contains an element that has the specified key; otherwise, false.

View Source

CopyTo(T[], Int32)

Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing.

System.Int32 arrayIndex

The zero-based index in array at which copying begins.

View Source

CopyTo(Array, Int32)

Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.

Declaration
public void CopyTo(Array array, int arrayIndex)
Parameters
Type Name Description
Array array

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing.

System.Int32 arrayIndex

The zero-based index in array at which copying begins.

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, T>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<System.String, T>>

An enumerator that can be used to iterate through the collection.

View Source

Load(Stream)

Loads the array from the specified stream.

Declaration
protected virtual T Load(Stream s)
Parameters
Type Name Description
Stream s
Returns
Type Description
T
View Source

Remove(T)

Throws a .

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean
View Source

TryGetValue(String, out T)

Gets the value that is associated with the specified key.

Declaration
public bool TryGetValue(string key, out T value)
Parameters
Type Name Description
System.String key

The key to locate.

T value

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
Type Description
System.Boolean

true if the object that implements the System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> interface contains an element that has the specified key; otherwise, false.

Implements

IReadOnlyDictionary<, >
ICollection<>

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)

See Also

NpyFormat
NpzFormat