本文整理匯總了TypeScript中@bokehjs/models/mappers/categorical_pattern_mapper.CategoricalPatternMapper類的典型用法代碼示例。如果您正苦於以下問題:TypeScript CategoricalPatternMapper類的具體用法?TypeScript CategoricalPatternMapper怎麽用?TypeScript CategoricalPatternMapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了CategoricalPatternMapper類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("should map factors to patterns with start=0, end=3", () => {
const patterns: Patterns = ["+", "dot", "vertical_line", "*"]
const factors: F3[] = [["a", "1", "foo"], ["a", "2", "foo"], ["b", "2", "foo"], ["c", "1", "bar"]]
const cm = new CategoricalPatternMapper({patterns, factors, start: 0, end: 3})
const vals = cm.v_compute(factors)
expect(vals).to.be.deep.equal(patterns)
})