Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format 语法 #5

Open
3 tasks
muzea opened this issue Feb 20, 2019 · 0 comments
Open
3 tasks

format 语法 #5

muzea opened this issue Feb 20, 2019 · 0 comments

Comments

@muzea
Copy link
Contributor

muzea commented Feb 20, 2019

允许重写一个约束渲染时候的 template

语法

format varName template

比如

constraint w int 1 10
constraint g graph graphNum nodeNum edgeNum
format g ${value[0]} ${value[1]} ${w}

这样可以实现有权图,目前这个语法主要用来扩展 graph 类型

影响

这个信息会挂在到约束上面

因为 stringify 的时候是没有 format 信息的,所以这里

todo

  • 如果数据挂在到约束上面 (现在的 shuffle) 那么多 store 的设计会有问题,需要修改
  • 如果不挂到约束上面,可能需要重新设计几个模块交互的api rawTemplate rawValue
  • 求值顺序 对于一个 graph 来说,是求完所有的边再取 format 计算,还是一条边算完 format 再算下一条边
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant