public Train ( List |
||
list | List |
InsertElements' List |
withException | bool | Indicate whether throw exception, /// if param is false, function will return 0 if train failed, if param is true, /// function will throw TrainException with detail information |
return | int |
private static void Train() { AddrSet addrset = AddrSet.GetInstance(); TrainMachine t = new TrainMachine(addrset); List<InsertElement> list = new List<InsertElement>(); Random rnd = new Random(); list.Add(new InsertElement(rnd.Next().ToString("0.00"), LEVEL.City, InsertMode.AutoPlace | InsertMode.ExactlyLevel)); t.Train(list, true); MatchHelper.rwLockDashboard(addrset); }
public void Train() { //start AddrSet addrset = AddrSet.GetInstance(); TrainMachine m = new TrainMachine(addrset); List<InsertElement> list = new List<InsertElement>(); list.Add(new InsertElement("武汉", LEVEL.City, InsertMode.AutoPlace | InsertMode.ExactlyLevel)); list.Add(new InsertElement("理工大", LEVEL.Other, InsertMode.AutoPlace | InsertMode.ExactlyLevel)); list.Add(new InsertElement("屋檐下", LEVEL.Uncertainty, InsertMode.AutoPlace | InsertMode.ExactlyLevel)); m.Train(list, true); //close //addrset.Dump(); }