1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      C++怎么為概念定義公理

      這篇文章主要介紹“C++怎么為概念定義公理”,在日常操作中,相信很多人在C++怎么為概念定義公理問題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”C++怎么為概念定義公理”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!

      創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括鳳翔網(wǎng)站建設(shè)、鳳翔網(wǎng)站制作、鳳翔網(wǎng)頁制作以及鳳翔網(wǎng)絡(luò)營(yíng)銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,鳳翔網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到鳳翔省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

      T.22:為概念定義公理

      Reason(原因)

      A meaningful/useful concept has a semantic meaning. Expressing these semantics in an informal, semi-formal, or formal way makes the concept comprehensible to readers and the effort to express it can catch conceptual errors. Specifying semantics is a powerful design tool.

      有意義/有用的概念會(huì)包含語義上的含義。以非正規(guī)的,半正規(guī)的或者正規(guī)的方式進(jìn)行表現(xiàn)這些語義可以讓概念更容易被用戶理解,而且表達(dá)概念的努力可以捕捉概念方面的錯(cuò)誤。定義語義是一種有力的設(shè)計(jì)工具。

      Example (using TS concepts)(示例(適用TS概念))

      template
         // The operators +, -, *, and / for a number are assumed to follow the usual mathematical rules
         // axiom(T a, T b) { a + b == b + a; a - a == 0; a * (b + c) == a * b + a * c; /*...*/ }
         concept Number = requires(T a, T b) {
             {a + b} -> T;   // the result of a + b is convertible to T
             {a - b} -> T;
             {a * b} -> T;
             {a / b} -> T;
         }
      Note(注意)

      This is an axiom in the mathematical sense: something that may be assumed without proof. In general, axioms are not provable, and when they are the proof is often beyond the capability of a compiler. An axiom may not be general, but the template writer may assume that it holds for all inputs actually used (similar to a precondition).

      這是一條有關(guān)數(shù)學(xué)規(guī)律的公理:某些不需要證據(jù)的假設(shè)。通常,公理是不可證明的,即使它們可以證明,通常也會(huì)超越編譯器的能力。公理可能并不普遍,但是模板作者可以假設(shè)它對(duì)所有實(shí)際使用的輸入有效(類似前提條件)

      Note(注意)

      In this context axioms are Boolean expressions. See the Palo Alto TR for examples. Currently, C++ does not support axioms (even the ISO Concepts TS), so we have to make do with comments for a longish while. Once language support is available, the // in front of the axiom can be removed

      在這個(gè)上下文中公理是一個(gè)布爾類型的表達(dá)式。參見Palo Alto TR中的例子。目前C++還沒有支持公理(包括ISO Concepts TS),因此我們必須在很長(zhǎng)一段時(shí)間將它放在注釋內(nèi)。一旦語言提供了對(duì)公理的支持,就可以去掉前面的//。

      Note(注意)

      The GSL concepts have well-defined semantics; see the Palo Alto TR and the Ranges TS.

      GSL概念提供了定義良好的語義。參見Palo Alto TR和范圍TS。

      Exception (using TS concepts)(例外(使用TS概念))

      Early versions of a new "concept" still under development will often just define simple sets of constraints without a well-specified semantics. Finding good semantics can take effort and time. An incomplete set of constraints can still be very useful:

      仍在開發(fā)中的新“概念”的早期版本通常只是定義某些約束的簡(jiǎn)單集合,而這些約束可能并不具有良好定義的語義。發(fā)現(xiàn)完美的語義需要努力和時(shí)間。約束的不完全集合同樣可以非常有用。

      // balancer for a generic binary tree
      template concept bool Balancer = requires(Node* p) {
         add_fixup(p);
         touch(p);
         detach(p);
      }

      So a Balancer must supply at least thee operations on a tree Node, but we are not yet ready to specify detailed semantics because a new kind of balanced tree might require more operations and the precise general semantics for all nodes is hard to pin down in the early stages of design.

      因此樹節(jié)點(diǎn)上的Balancer必須至少支持三個(gè)操作,但是我們還沒有準(zhǔn)備好定義語義的細(xì)節(jié),因?yàn)樾路N類的平衡樹可能需要更多的操作,而且適用于所有節(jié)點(diǎn)的準(zhǔn)確、通用的語義很難在設(shè)計(jì)的早期階段確定。

      A "concept" that is incomplete or without a well-specified semantics can still be useful. For example, it allows for some checking during initial experimentation. However, it should not be assumed to be stable. Each new use case may require such an incomplete concept to be improved.

      不完全或者沒有良好定義的“概念”仍然有用。例如,它允許在初始化階段進(jìn)行某些檢查。然而,它不應(yīng)該被認(rèn)定是穩(wěn)定的。每一次新用法都可能讓這個(gè)不完全的概念發(fā)生改變。

      Enforcement(實(shí)施建議)

      • Look for the word "axiom" in concept definition comments

      • 在概念定義的注釋中發(fā)現(xiàn)”axiom“。

      到此,關(guān)于“C++怎么為概念定義公理”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!


      網(wǎng)站名稱:C++怎么為概念定義公理
      文章位置:http://ef60e0e.cn/article/ijdjch.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        双流县| 临桂县| 永春县| 乌苏市| 汤原县| 内黄县| 巴彦县| 深水埗区| 锡林郭勒盟| 神农架林区| 宜春市| 原平市| 綦江县| 保亭| 浪卡子县| 峨边| 雅江县| 安吉县| 滨海县| 金沙县| 蒙山县| 拜泉县| 安徽省| 监利县| 岑巩县| 鹤壁市| 宣武区| 海安县| 江源县| 富蕴县| 敦煌市| 惠州市| 武城县| 介休市| 大化| 峨眉山市| 长泰县| 滨州市| 乡城县| 绥中县| 盐边县|