/// <summary>Create a new sparse Vector</summary> /// <param name="location">Subspace where the vector will be stored</param> /// <param name="defaultValue">Default value for sparse entries</param> /// <param name="encoder">Encoder used for the values of this vector</param> public FdbVector(DynamicKeySubspaceLocation location, T defaultValue, IValueEncoder <T>?encoder = null) { Contract.NotNull(location, nameof(location)); this.Location = location; this.DefaultValue = defaultValue; this.Encoder = encoder ?? TuPack.Encoding.GetValueEncoder <T>(); }
/// <summary>Create a new High Contention counter, using a specific value encoder.</summary> /// <param name="location">Location for storing the counters</param> /// <param name="encoder">Encoder for the counter values</param> public FdbHighContentionCounter(DynamicKeySubspaceLocation location, IValueEncoder <long> encoder) { this.Location = location ?? throw new ArgumentNullException(nameof(location)); this.Encoder = encoder ?? throw new ArgumentNullException(nameof(encoder)); }