发件人: "Y. Richard Yang" <yry@...>
发送时间: 2015-04-22 21:09:09 (星期三)
收件人: "董舒" <dongs2011@...>
抄送: "Kai Gao" <gaok12@...>, "Xin Li" <yakumolx@...>, "Xin Wang (Tongji)" <xinwang2014@...>, "Wendy Roome" <wendy@...>, "alto-dev@..." <alto-dev@...>
主题: Re: ALTO in ODL Planning
Let's schedule a design meeting soon. It depends on when Xin and Kai are available.
Xin/Kai: please let us know.
Let me summarize the option, if we use yang (BTW: I always think using yang is a wrong design decision, because it does not add much free ride but add much restriction, at least for a programmer, :-(
Here is the proposal: Base cost-map includes only meta; depends on cost-metric, we add (augment) the correct hash map. This is to simulate the inheritance design in my previous email (base class has only meta and each derived class has the correct HashMap of HashMap; note there is a typo in the previous email, which I fixed in this reply). I will take a look at Jackson to see how it handles such stateful parsing.
I thought about a yang storage model where each cost value is always a float (this is allowed by the Java promotion rule), but it is a hack that will fall apart when we add vector.
On Wednesday, April 22, 2015, 董舒 <dongs2011@...
Sorry for the late reply. Just come back from office.
Actually I don't have a solution for the default cost field problem but the intuition told me that we should set a default cost field in alto-model instead of leave it as empty. I think your design is very good, but I have no idea how to implement it by yang. Do you think it's necessary to schedule a meeting to discuss it together?