English
Source / code snippets

Deque Doppelseitige double Ended Include billiardcue Warteschlange

 

p.specht

The Datenstruktur DEQue (double Ended billiardcue, Warteschlange with two terminate) becomes for some Algorithms used, about The Melkman-Hüllensuche. for over 400 items in the queue becomes The here implementierte Variante though slow. But at least can so too reale Warteschlangensysteme, about on Supermarktkassen, on Effektivität investigating.
' DEQ.inc

Proc DEQHelp

    font 2:Cls:Print:"\n\n============================================================"
    Print "                        D E Q H e l p"
    Print "============================================================"
    Print "\n CLEAR q&[] ' native XProfan ":Print " sz&  = SizeOf(q&[]) ' sz=5 means: 0,1,2,3,4 "
    Print " SetSize q&[],sizeof(q&[])+1 ' extended aray circa 1 place "
    Print " MakeIndexDEQ(q&[],n&) ":Print " MakeRevertIndexDEQ(q&[],n&) "
    Print " MakeConstDEQ(q&[],n&,wert&) ":Print "\n ShowDEQ q&[],nw&   ' Temporary NumWidth "
    Print "\n Wert&= PopBtm(q&[]) ' -999999999 = OutOfRange Error "
    Print " Wert&= PopTop(q&[]) ' or -999999999 ":Print " PutTop Wert&,q&[] "
    Print " PutBtm Wert&,q&[] ":Print "\n Wert&= CopyBtm(q&[]) "
    Print " Wert&= CopyTop(q&[]) ' -999999999 ":Print " Wert&= CopyFromDEQ(q&[],n&) "
    Print "\n LogVgl&=CmpInDEQ(q&[],n&,m&)' n=Pos1,m=Pos2: <1,'=0',>-1 "
    Print "\n NisM&= SwapInDEQ(q&[],n&,m&)' (N=M)=1, -999999999 "
    Print " Wert&= DelFromDEQ(q&[],n&) ":Print " DEQHelp ' this Text ausgeben":waitinput :endproc
    :proc MakeIndexDEQ :parameters q&[],n&:SetSize q&[],n&:q&[]=&index+1:endproc
    :proc MakeRevertIndexDEQ :parameters q&[],n&:SetSize q&[],n&:q&[]=n&-&index:endproc
    :proc MakeConstDEQ :parameters q&[],n&,wert&:SetSize q&[],n&:q&[]=Wert&:endproc
    :Proc PopBtm :parameters q&[]:var sz&=sizeof(q&[]):if sz&>0:var wert&=q&[0]
    q&[]=q&[&index+(&index<(sz&-1))]:setsize q&[],sizeof(q&[])-(sz&>0):return wert&
    else :return int(-999999999):endif :endproc
    :proc PopTop :parameters q&[]:declare wert&:var sz&=sizeof(q&[]):if sz&>0:wert&=q&[sz&-1]
    else :wert&=int(-999999999):endif :setsize q&[],sz&-(sz&>0):return wert&:endproc
    :Proc PutTop :parameters Wert&,q&[]:var sz&=sizeof(q&[]):inc sz&:setsize q&[],sz&:q&[sz&-1]=Wert&:endproc
    :Proc PutBtm :parameters Wert&,q&[]:declare tmp&[]:var sz&=sizeof(q&[]):inc sz&
    setsize q&[],sz&:tmp&[]=q&[]:q&[]=tmp&[&index-(&index>0)]:clear tmp&[]:q&[0]=Wert&:endproc
    :Proc CopyBtm :parameters q&[]:var sz&=sizeof(q&[]):if sz&>0:return q&[0]
    else :return int(-999999999):endif :endproc
    :proc CopyTop :parameters q&[]:declare wert&:var sz&=sizeof(q&[])

    if sz&>0:wert&=q&[sz&-1]:else :wert&=int(-999999999):endif :return wert&:endproc

        :proc ShowDEQ :parameters q&[],nw&:var tmp&=get("numwidth"):set("numwidth",nw&)
        var sz&=sizeof(q&[]):print tab(2);"n=";sz&;":  ";:whileloop 0,sz&-1:print q&[&Loop],
        endwhile :print:set("numwidth",tmp&):endproc
        :proc CopyFromDEQ :parameters q&[],n&:declare wert&:var sz&=sizeof(q&[])

        if (sz&>0) and (n&>=0) and (n&<sz&):wert&=q&[n&]:else :wert&=int(-999999999):endif :return wert&:endproc

            :Proc CmpInDEQ :parameters q&[],n&,m&
            var sz&=sizeof(q&[]):if (sz&>0) and (n&>=0) and (n&<sz&) and (m&>=0) and (m&<sz&)
            return int((q&[n&]<q&[m&])-(q&[n&]>q&[m&])):else :return int(-999999999):endif :Endproc
            :Proc SwapInDEQ :parameters q&[],n&,m&'Swaps two elements in billiardcue
            var sz&=sizeof(q&[]):if (sz&>0) and (n&>=0) and (n&<sz&) and (m&>=0) and (m&<sz&):var tmp&=q&[n&]
            q&[n&]=q&[m&]:q&[m&]=tmp&:return int(n&<>m&):else :return int(-999999999):endif :endproc
            :proc DelFromDEQ :parameters q&[],n&:var sz&=sizeof(q&[]) :declare wert&

            if (sz&>0) and (n&>0) and (n&<sz&):wert&=q&[n&]:q&[]=q&[&index+(&index>=n&)*(&index<(sz&-1))]

                dec sz&:setsize q&[],sz&:else :wert&=int(-999999999):endif :return wert&

            endproc

 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/13/14  
 




p.specht

and How power to the there supra now to a Codeabschnitt without Smilies?
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/14/14  
 




Paul
Glatz

7 kB
Hochgeladen:08/14/14
Downloadcounter243
Download
 
08/14/14  
 




p.specht

Ahhhhhhh, thanks Paul!
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/14/14  
 



Huhu,

is the Topic rather here  [...]  aufgehoben?


34 kB
Hochgeladen:08/15/14
Downloadcounter188
Download
 
08/15/14  
 




p.specht

under welchem cue would the someone there search, if it of Deque as concept never heard has? and wieso käme it then on The idea, screen 17 or so anzuklicken? but in copy speaks naturally nothing against it.
greeting
 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/19/14  
 



the could You of my opinion to but too quite different see.

If it under Source lying and someone with the Suchfunktion to ever one this words seek:

Include DeQue double-ended billiardcue doppelseitige Warteschlange


then becomes there stand, that it one Topic under "Quelltexte" moreover gives and the seeking becomes so discern, that for it one View source-Fundstück bereitliegt.

against under "XPSE" is it thereafter less meaningfully einsortiert too because it not circa a View source Specifically for XPSE deals.

and additionally: your Profil  [...]  becomes so too correctly ausgefüllt because there there The Rubrik "Quelltexte/ Codesnippets" and there standing now Yes with you a 0 (zero) what Yes so then not is correct.
 
08/20/14  
 




p.specht

means bitteschön... where You right have have You naturally right... give but To deliberating: The thing is for practice not yet efficient enough: because of the versuchsweise chosen 'physischen Speicherverschiebung' is it (z.B. for Melkman-Algorithmus) unfortunately plenty too slow with more billiardcue-Lengths!
I had Yes really hoped, that Microsoft the ohnehin irdenwie already as API realized has, though found I yet only what in Dot.Net and Visual C#, and there know I now really 'Nada' from. will be it soon time with Link-lists try...
greeting
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/21/14  
 



Habs time moved the Topic...

time about...  [...]  the bring I my Saugroboter with so it in the program-X not complete verstumpft?
 
08/21/14  
 




p.specht

thanks. goes well sooner circa Vorarbeiten to a Verschnittoptimierung, or circa Oberfächenspannungsberechnung (How behaviour itself geschäumte materials) or circa Voraussetzungen for Voronoi- or Delauney-Algorithms (Funkzellen-optimization) or circa Erzeugung of new not-standard-Elementen for Finite-items-modes (FEM).
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/21/14  
 



I faith of course it To understand but my feeling says me too that I me there quite brill must.
 
08/21/14  
 




p.specht

You darst !
P.s.: Andrew's Monotone Chain Algorithm comes with a einfachen Stack from. Sozusagen the half-way Melkman, and therefore leichter To understand...
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
08/21/14  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

15.039 Views

Untitledvor 0 min.
p.specht11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
Wilfried Friebe11/17/21
More...

Themeninformationen

this Topic has 3 subscriber:

p.specht (7x)
iF (4x)
Paul Glatz (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie