本文整理匯總了TypeScript中core/util/array.intersection類的典型用法代碼示例。如果您正苦於以下問題:TypeScript intersection類的具體用法?TypeScript intersection怎麽用?TypeScript intersection使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了intersection類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: compute_indices
compute_indices(): void {
const indices = this.filters.map((filter) => filter.compute_indices(this.source))
.filter((indices) => indices != null)
if (indices.length > 0)
this.indices = intersection.apply(this, indices)
else if (this.source instanceof ColumnarDataSource)
this.indices = this.source.get_indices()
this.indices_map_to_subset()
}
示例2: compute_indices
compute_indices(): void {
let indices = (this.filters.map((filter) => filter.compute_indices(this.source)))
indices = ((() => {
const result = []
for (const inds of indices) {
if (inds != null) {
result.push(inds)
}
}
return result
})())
if (indices.length > 0) {
this.indices = intersection.apply(this, indices)
} else {
if (this.source instanceof ColumnarDataSource) {
this.indices = this.source.get_indices()
}
}
this.indices_map_to_subset()
}