public void Test2ndTM27(string testString) { SettingsManager.MtxType = MatrixType.SecondOrder27; MatrixGenFxn fxn = SettingsManager.DisPatchMatrixGenFxn(); double[,] transitionMatrix = fxn(testString); PrintMatrix(transitionMatrix); }
public static MatrixGenFxn DisPatchMatrixGenFxn() { switch (MtxType) { case MatrixType.Tm27: { MatrixGenFxn handler = delegate(string s) { return(GetTM27(s)); }; return(handler); } case MatrixType.SecondOrder27: { MatrixGenFxn handler = delegate(string s) { return(Get2ndTM27(s)); }; return(handler); } } throw new Exception("This shouldn't happen, please go check source codes."); }