代码之家  ›  专栏  ›  技术社区  ›  Duck

你在实际工作中使用过boost::tripool吗?

  •  19
  • Duck  · 技术社区  · 16 年前

    6 回复  |  直到 13 年前
        1
  •  20
  •   Matthew Scharley    16 年前

    虽然我没有使用C++,因此也没有使用boost,但我在网络应用程序中广泛使用了三个状态变量,在这个应用程序中,我需要将状态存储为true/false/pending。

        2
  •  15
  •   Robert Cartaino    16 年前

    true false ,a的状态 tribool indeterminate .

    customers dateOfBirth

    tribool IsCustomerAdult(customerName);
    

    函数返回:

    `true` if the customer is 18 or older;
    `false` if the customer is less than 18;
    `indeterminate` if the customer is not in the database 
         (or the dateOfBirth value is not present).
    

    非常有用。

        3
  •  11
  •   Garrett Hyde NeilP    13 年前

    (true && indeterminate) == indeterminate
    (true || indeterminate) == true
    

    SQL实现了这样的逻辑。

        4
  •  5
  •   Tim Sylvester    16 年前

        5
  •  3
  •   bn.    16 年前

    我是Boost库的忠实粉丝,并在我离开的公司开始使用它。在整个项目中广泛接触和使用boost库后,我偶然发现了tripool,并考虑将其用于一些需要改进的“模糊逻辑”算法。

        6
  •  1
  •   Hashem    16 年前

    我认为它对OCR应用程序和语音合成等语言建模非常有用,因为正如你所知,人类语言是模糊的,它们有很多中间状态

    展望利用tripool改进现有技术