本文整理汇总了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)
})