@@ -28,7 +28,7 @@ export default abstract class Vector extends TypeBase {
28
28
offset : number ,
29
29
qtype : number ,
30
30
dataView : DataView ,
31
- size : number
31
+ size : number ,
32
32
) {
33
33
super ( length , offset , qtype ) ;
34
34
this . dataView = dataView ;
@@ -54,9 +54,9 @@ export default abstract class Vector extends TypeBase {
54
54
new Uint8Array (
55
55
this . dataView . buffer ,
56
56
this . offset ,
57
- arg . length * this . size
57
+ arg . length * this . size ,
58
58
) . set (
59
- new Uint8Array ( arg . dataView . buffer , arg . offset , arg . length * this . size )
59
+ new Uint8Array ( arg . dataView . buffer , arg . offset , arg . length * this . size ) ,
60
60
) ;
61
61
}
62
62
@@ -79,20 +79,20 @@ export default abstract class Vector extends TypeBase {
79
79
if ( this . size !== 8 || [ 9 , 15 ] . indexOf ( this . qtype ) !== - 1 ) {
80
80
const compareFn = ( x : number , y : number ) : number =>
81
81
x - ( this . hash ( y ) as number ) ;
82
- // @ts -ignore
82
+ // @ts -expect-error
83
83
return Tools . binarySearch2 ( Number ( value ) , this . index , compareFn ) ;
84
84
} else {
85
85
const compareFn = ( x : bigint , y : number ) : number =>
86
86
Number ( x - ( this . hash ( y ) as bigint ) ) ;
87
- // @ts -ignore
87
+ // @ts -expect-error
88
88
return Tools . binarySearch2 ( BigInt ( value ) , this . index , compareFn ) ;
89
89
}
90
90
}
91
91
92
92
public mergeKeyedPrimary (
93
93
arg : Vector ,
94
94
maxRows : number ,
95
- insertIndices : Array < number >
95
+ insertIndices : Array < number > ,
96
96
) : number {
97
97
this . resetRangeCache ( ) ;
98
98
this . index = this . index ? this . index : this . generateIndex ( ) ;
@@ -121,13 +121,13 @@ export default abstract class Vector extends TypeBase {
121
121
new Uint8Array (
122
122
this . dataView . buffer ,
123
123
this . offset + targetIndex * this . size ,
124
- this . size
124
+ this . size ,
125
125
) . set (
126
126
new Uint8Array (
127
127
arg . dataView . buffer ,
128
128
arg . offset + i * this . size ,
129
- this . size
130
- )
129
+ this . size ,
130
+ ) ,
131
131
) ;
132
132
insertIndices . push ( targetIndex ) ;
133
133
} else {
@@ -142,7 +142,7 @@ export default abstract class Vector extends TypeBase {
142
142
arg : Vector ,
143
143
indices : Array < number > ,
144
144
indexOffset : number ,
145
- maxRows : number
145
+ maxRows : number ,
146
146
) : void {
147
147
this . resetRangeCache ( ) ;
148
148
for ( let i = 0 ; i < indices . length ; i ++ ) {
@@ -159,13 +159,13 @@ export default abstract class Vector extends TypeBase {
159
159
new Uint8Array (
160
160
this . dataView . buffer ,
161
161
this . offset + targetIndex * this . size ,
162
- this . size
162
+ this . size ,
163
163
) . set (
164
164
new Uint8Array (
165
165
arg . dataView . buffer ,
166
166
arg . offset + i * this . size ,
167
- this . size
168
- )
167
+ this . size ,
168
+ ) ,
169
169
) ;
170
170
}
171
171
@@ -176,7 +176,11 @@ export default abstract class Vector extends TypeBase {
176
176
this . bufferLength = extLength || this . bufferLength ;
177
177
const buffer = new ArrayBuffer ( this . bufferLength * this . size ) ;
178
178
new Uint8Array ( buffer , 0 , this . length * this . size ) . set (
179
- new Uint8Array ( this . dataView . buffer , this . offset , this . length * this . size )
179
+ new Uint8Array (
180
+ this . dataView . buffer ,
181
+ this . offset ,
182
+ this . length * this . size ,
183
+ ) ,
180
184
) ;
181
185
182
186
this . dataView = new DataView ( buffer ) ;
@@ -212,18 +216,18 @@ export default abstract class Vector extends TypeBase {
212
216
const typedArray = new TA ( this . length ) ;
213
217
214
218
typedArray . set (
215
- // @ts -ignore
219
+ // @ts -expect-error
216
220
new TA (
217
221
this . dataView . buffer ,
218
222
this . indexOffset * this . size ,
219
- this . length - this . indexOffset
220
- )
223
+ this . length - this . indexOffset ,
224
+ ) ,
221
225
) ;
222
226
223
227
typedArray . set (
224
- // @ts -ignore
228
+ // @ts -expect-error
225
229
new TA ( this . dataView . buffer , 0 , this . indexOffset ) ,
226
- this . length - this . indexOffset
230
+ this . length - this . indexOffset ,
227
231
) ;
228
232
229
233
return typedArray ;
@@ -252,7 +256,7 @@ export default abstract class Vector extends TypeBase {
252
256
index . sort ( ( a , b ) => ( this . hash ( a ) as number ) - ( this . hash ( b ) as number ) ) ;
253
257
} else {
254
258
index . sort ( ( a , b ) =>
255
- Number ( ( this . hash ( a ) as bigint ) - ( this . hash ( b ) as bigint ) )
259
+ Number ( ( this . hash ( a ) as bigint ) - ( this . hash ( b ) as bigint ) ) ,
256
260
) ;
257
261
}
258
262
0 commit comments