index b688158..860e317 100644 (file)
@@ -1,7 +1,7 @@
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-//
// Copyright (C) 2012 - 2016 - Scilab Enterprises
+// Copyright (C) 2018 - Samuel GOUGEON
//
// This file is hereby licensed under the terms of the GNU GPL v2.0,
// pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -9,12 +9,38 @@
// and continues to be available under such terms.
// For more information, see the COPYING file which you should have received
// along with this program.
-function [m,n]=%cblock_size(M)
-    n=size(definedfields(M),"*")-1;
-    m=size(getfield(2,M),1);
-    n=0
-    for k=2:size(definedfields(M),"*")
-        n=n+size(getfield(k,M),2);
+
+function [m,n] = %cblock_size(M, o)
+    n = size(definedfields(M),"*")-1;
+    if ~isdef("o","l") then
+        o = -1    // [m, n]
+    elseif o=="r" | o==1
+        o = 1
+    elseif o=="c" | o==2
+        o = 2
+    elseif o=="*" | o==0
+        o = 0
+    else //
+        o = -1
+    end
+    if n==0 then
+        m = 0
+    else
+        m = size(getfield(2,M),1);
+        if o~=1
+            n = 0
+            for k = 2:size(definedfields(M),"*")
+                n = n + size(getfield(k,M),2);
+            end
+        end
+    end
+    if argn(1)==1 then
+        if o==0
+            m = m*n
+        elseif o==2
+            m = n
+        elseif o==-1
+            m = [m,n]
+        end
end
-    if argn(2)==1 then m=[m,n],end
endfunction
{"ft_lang_label":"__label__en","ft_lang_prob":0.51559424,"math_prob":0.98454857,"size":1176,"snap":"2020-45-2020-50","text_gpt3_token_len":463,"char_repetition_ratio":0.12798634,"word_repetition_ratio":0.009009009,"special_character_ratio":0.45663264,"punctuation_ratio":0.15830116,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99940395,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-25T03:29:28Z\",\"WARC-Record-ID\":\"<urn:uuid:0e314118-0ab2-4192-8f35-0cc641b209df>\",\"Content-Length\":\"13224\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c540909d-585c-4dc1-9b83-e570cad8af9f>\",\"WARC-Concurrent-To\":\"<urn:uuid:68038872-d77a-42ca-ac06-843038a7ad00>\",\"WARC-IP-Address\":\"109.7.104.54\",\"WARC-Target-URI\":\"http://gitweb.scilab.org/?p=scilab.git;a=blobdiff;f=scilab/modules/overloading/macros/%25cblock_size.sci;h=860e317847264cd0de05d90f11da20c726371ee1;hp=b688158c8794fca69034f1e643ec1a9207ee057a;hb=acf8b402658890a5797d2575db4a49c1b1239ae8;hpb=7b896e1d26539e3f16b4ef61ce7b55d57ddab201\",\"WARC-Payload-Digest\":\"sha1:ZESLYJ4KG7TBTQ7ZE2UQJR3VLAPB2NA3\",\"WARC-Block-Digest\":\"sha1:VLZUSNP3IZQKQM2HKISGT2KTCYJJCECI\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141180636.17_warc_CC-MAIN-20201125012933-20201125042933-00235.warc.gz\"}"}