乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      表驅(qū)動法 規(guī)則引擎

       Jimmy Booker 2011-03-14

      表驅(qū)動法 規(guī)則引擎

      2007-08-25

      分類:

      版權聲明:轉(zhuǎn)載時請以超鏈接形式標明文章原始出處和作者信息及本聲明
      http://nxk4124./logs/45698480.html

      發(fā)覺主程的代碼為何我讀起來那么不耐煩的原因了,他的代碼里有大量的IF-ELSE-THEN。

      讀起來很費勁兒,解決的方案有1、 引入表驅(qū)動法簡化代碼結構。2、規(guī)則引擎。

      ==============================

      1、表驅(qū)動法,將CASE語句轉(zhuǎn)為數(shù)據(jù)表。

      直接參照《代碼大全》P412頁即可~  

      簡單地說就是建立一個HASH表,代替復雜的邏輯判斷。應用起來很有難度,不過在各種費率以及保險費率查詢中應用廣泛。

      charType = charTypeTable[ inputChar ];

       

      • 直接訪問表:例子為閏年、保險費率(用年齡作為下標,直接查找處費率即可?。÷斆靼。。。?/li>
      靈活的消息,這個例子尚未吃透,明天繼續(xù)。
       
      此方法的優(yōu)點為,根本就不需要引入一個規(guī)則引擎這么復雜的東西。僅僅是教會程序員這么思考問題即可??!
       
      ============================== 

       

      2、 已知的規(guī)則引擎有(FOR .NET):

      Open Source Rule Engines are free, open-source rule engines in C#.

      Drools.NET
      Drools.NET is a Business Rules Engine (BRE) based on Charles Forgy's Rete algorithm. Developers can now exploit a powerful Rule Engine through a completely managed .NET code base! Drools.NET is based on Jboss Rules(http://www./products/rules), and comes with all the features of that Rules Engine.
      NxBRE
      NxBRE .NET Business Rule Engine is the first open-source rule engine for the .NET platform and a lightweight Business Rules Engine aka Rule-Based Engine.
      Simple Rule Engine
      Simple Rule Engine (SRE) is a lightweight forward chaining inference rule engine for .NET. Its 'simple' because of the simplicity in writing and understanding the rules written in XML, but this 'simple' engine can solve complex problems.
      FlexRule BRMS Solution
      FlexRule is a full managed BRMS and BRE written in C# that provides a procedure execution engine and RETE based inference engine for FREE of charge as an express version. It has ability to be used in API mode and/or high level language mode(Xml based and S-Expression). All the features can be fully extensible by developers.

      More features and flexibilities for professionals and enterprise systems are available too.

      ================== 

       

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多