2012年1月6日

摘要: 1 class A 2 { 3 static ....; //indices and vertices 4 public: 5 void initDataWithD3D(...); //init the graphics with the static data by d3d 6 } 7 8 ......; //initial the static params and reality functions 9 10 11 ........12 ........13 ........14 A* a = new A();15 a->initDataWit... 阅读全文
posted @ 2012-01-06 18:12 shizuka 阅读(88) 评论(0) 推荐(0) 编辑
摘要: EMBEDED的培训的时候,经常使用查表的方法来减少计算量。因为这个方法给我的印象很深而且超好用,后来解决需求总能想到查表。今天突然想到状态机,联系到查表也能有个实现。当然也是有限制条件的。按照TABLE定义array[][],array[status][action]就是下个status了。或者更要求空间的话可以MAP<pair<status, action>, status>,不过用的时候查找会麻烦点。 阅读全文
posted @ 2012-01-06 10:54 shizuka 阅读(248) 评论(0) 推荐(0) 编辑

导航