export { Bag };

import * as MapTools from "../../util/MapTools.js";
import * as RandTools from "../../util/RandTools.js";

/**
 * A pool for number array which is created with sequence and randomized offset. It could reduce re-create them of same parameters again
 * and again to improve performance.
 *
 */
class Bag {

//!!! ...unfinished... (2022/05/23)
  constructor() {
    this.by_inputChannelCount_outputChannelCount_inputChannelIndexStart_bBias_filterValue_biasValue = new Map();
  }

  get_by_nPassThroughStyleId( inputChannelCount, outputChannelCount, inputChannelIndexStart, bBias, nPassThroughStyleId ) {

//!!! ...unfinished... (2022/05/23)
//     let nPassThroughStyleId = ValueDesc.PassThroughStyle.Singleton.Ids.PASS_THROUGH_STYLE_FILTER_1_BIAS_0;
//     const thePassThroughStyleInfo = ValueDesc.PassThroughStyle.Singleton.getInfoById( nPassThroughStyleId );

  }

  get_by_filterValue_biasValue( inputChannelCount, outputChannelCount, inputChannelIndexStart, bBias, filterValue = 1, biasValue = 0 ) {

//!!! ...unfinished... (2022/05/23)
    let by_outputChannelCount_inputChannelIndexStart_bBias_filterValue_biasValue
      = MapTools.get_or_create(
          this.by_inputChannelCount_outputChannelCount_inputChannelIndexStart_bBias_filterValue_biasValue, inputChannelCount );

  }

//!!! ...unfinished... (2022/05/23)
  /** Release all tensors. */
  disposeTensors() {
    if ( this.tensorsBy_originalHeight_originalWidth_channelCount_filterHeight_filterWidth_stridesPad ) {

      for ( let tensor
        of MapTools.values_recursively( this.tensorsBy_originalHeight_originalWidth_channelCount_filterHeight_filterWidth_stridesPad ) ) {

        tensor.dispose();
      }

      this.tensorsBy_originalHeight_originalWidth_channelCount_filterHeight_filterWidth_stridesPad.clear();
    }
  }

}

@@ -23,23 +23,28 @@
 t * as M
-apTools
+ultiLayerMap
  from %22.
@@ -54,23 +54,28 @@
 ./util/M
-apTools
+ultiLayerMap
 .js%22;%0Aim
@@ -236,17 +236,19 @@
 re-creat
-e
+ing
  them of
@@ -267,17 +267,17 @@
 ters
+%0A *
  again
-%0A *
  and
@@ -324,16 +324,43 @@
 ass Bag 
+extends MultiLayerMap.Base 
 %7B%0A%0A//!!!
@@ -390,16 +390,19 @@
 /05/23)%0A
+// 
   constr
@@ -415,121 +415,27 @@
 ) %7B%0A
+//
     
-this.by_inputChannelCount_outputChannelCount_inputChannelIndexStart_bBias_filterValue_biasValue = new Map
+ super
 ();%0A
+// 
   %7D%0A

Update SequenceRandomArray.js