using pdf.js in mvc : Conversion pdf to jpg application SDK utility azure wpf .net visual studio GrGenNET-Manual16-part1915

CHAPTER 13
CONTAINER TYPES AND COMPUTATIONS
13.1 Built-InTypesandConceptofContainers
Besides thetypes already introduced,GrGen.NET supportsthebuilt-ingenerictypes in
Table13.1. Theexacttypeformatisbackendspecic. TheLGSPBackendmapsthegeneric
types togenericC#-Dictionaries(i.e. . hashmaps)orgenericC#-Lists s (misnameddynamic
arrays)oraGrGen.NETsuppliedgenericC#-Dequeoftheircorrespondingprimitivetypes,
withde.unika.ipd.grGen.libGr.SetValueTypeastargettypeforsets,onlyusedwiththe
valuenull.
set<T>
A(mathematical)setoftypeT,whereTmaybeanenumerationtypeorone
oftheprimitivetypesfrom6.1;itmayevenbeanodeoredgeorgraphtype,
thenwespeakofstorages.
map<S,T>
A(mathematical)mapfromtypeStotypeT,whereSandTmaybeenumer-
ationtypesoroneoftheprimitivetypesfrom6.1;itmayevenbeanodeor
edgeorgraphtype,thenwespeakofstorages.
array<T>
AnarrayoftypeT,whereTmaybeanenumerationtypeoroneoftheprimitive
typesfrom6.1;itmayevenbeanodeoredgeorgraphtype,thenwespeak
ofstorages. Sharessomesimilaritieswithmap<int,T>.
deque<T>
AdequeoftypeT,whereTmaybeanenumerationtypeoroneoftheprimitive
typesfrom6.1;itmayevenbeanodeoredgeorgraphtype,thenwespeak
ofstorages. Sharessomesimilaritieswitharray<T>.
Table13.1:GrGen.NETbuilt-ingenerictypes
ThefourcontainertypessupportedbyGrGensharealotofconceptualsimilaritiesand
canbeaccessedinasimilar way. . Theysupportmultiplemethods s toupdatethem: : addto
addanelement tothecontainer,remtoremoveanelementfromthecontainer,andclear
toremoveallelementsfromthecontainer. Furthermore,theysupportmultiplemethodsto
querythem:sizetoreturnthecountofelementsinthecontainer,emptytoreturnwhether
thecontainerisemptyornot,andpeektoreturnanelementfromthecontainer.
In addition tothose common methods s there is s special syntax x support available. . Left
associativebinaryexpressionsallowtocomputeanewcontainerfromtwoinputcontainers,
ortocomparetwocontainers. Indexedaccessreturnsanelementatanindexposition,and
indexedassignmentoverwritesanelementataspeciedpositionwithanotherone.Container
typedvariablesassuchmaybeassignedacontainer,employingvaluesemantics. Compound
assignments combine a binary expressionwithan n assignment. . The e in n operator allows to
queryforcontainment. Constructorliteralsmaybeusedtocreateandinitializecontainers.
Andnallyiterationovertheelementsinthecontainerissupportedwithaforloop. These
operationsareavailableintherulelanguage,asanextensionoftheexpressionsfrom6andthe
computationstatements from12;mostofthemareavailableinthesequencecomputations
language,too(17.4willtellaboutthedierencescomparedtotherulelanguage).Intheif
147
Conversion pdf to jpg - Convert PDF to JPEG images in C#.net, ASP.NET MVC, WinForms, WPF project
How to convert PDF to JPEG using C#.NET PDF to JPEG conversion / converter library control SDK
convert pdf to jpg for; convert pdf into jpg
Conversion pdf to jpg - VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.net, ASP.NET MVC, WinForms, WPF project
Online Tutorial for PDF to JPEG (JPG) Conversion in VB.NET Image Application
batch pdf to jpg converter; batch pdf to jpg converter online
148
ContainerTypesandComputations
attributeevaluationclauseonlyside-eectfreecontainerqueriesareallowed. Inthefollowing
thecontaineroperationswillbeexplainedindetailforonetypeafteranother.
13.2 SetOperations
Setexpressions consistoftheknownmathematicalsetoperations,plus someoperations in
methodcallnotation.
SetExpr
-
PrimaryExpr
-
MethodSelector
-
Expr
-
in
-
SetExpr
-
SetExpr
-
SetOperator
-
SetExpr
-
MethodCall
-
SetEntity
-
MethodSelector
-
Assignment
-
SetEntity
-
=
-
SetExpr
-
CompoundAssignment
-
SetEntity
-
SetOperator
-
=
-
Expr
-
ChangeAssignment
-
SetConstructor
-
set
-
<
-
Type
-
>
-
f
-
Expression
,
-
g
-
Thequerymethodcallsonsetsare:
.size()
returnsthenumberofelementsintheset,asint
.empty()
returnswhetherthesetisempty,asboolean
.peek(num)
returnstheelementwhichcomesatpositionnum:intinthesequenceofenumeration,
asTforset<T>;thehigherthenumber,thelongerretrievaltakes
.asArray()
returnsanarrayofthesetcontent,asarray<T>forset<T>,inenumerationorder
Online Convert Jpeg to PDF file. Best free online export Jpg image
start immediately to sort the files, try out some settings and then create the PDF files with the button at the bottom. The perfect conversion tool. JPG is the
convert .pdf to .jpg online; changing pdf to jpg on
Online Convert PDF to Jpeg images. Best free online PDF JPEG
takes a few seconds. Web Security. Your PDF and JPG files will be deleted from our servers an hour after the conversion. No-one has
convert multipage pdf to jpg; convert pdf images to jpg
13.2 SetOperations
149
Theupdatemethodcallsonsetsare:
Setaddition:
s.add(v)addsthevaluevtothesets.
Setremoval:
s.rem(v)removesthevaluevfromthesets.
Setclearing:
s.clear()removesallvaluesfromthesets.
Thebinarysetoperatorsare:
|
Setunion(containedinresultingsetassoonascontainedinoneofthesets)
&
Setintersection(containedinresultingsetonlyifcontainedinbothofthesets)
\
Setdierence(containedinresultingseticontainedinleftbutnotrightset)
Table13.2: Binarysetoperators,inascendingorderofprecedence
Thebinarysetoperatorsrequiretheleftandrightoperandstobeofidenticaltypeset<T>.
Theoperatorx in sdenotessetmembershipx2s,returningwhetherthesetcontainsthe
givenelement,asboolean. ItisaO(1)operationforsets. Furthermore,thecontainermay
beiteratedoverwithaforloop,asintroducedin12.3. Thesetonlyallowsfornon-indexed
iteration.
Therelationalexpressions(alreadyintroducedin6.4)usedtocompareentitiesofdierent
kinds,mappingthemtothetypeboolean,areextendedtosetsaccordingtotable13.3:Some
setAisasubsetof BiallelementsinAarecontainedinB,too.
A == B
True,iAandBareidentical.
A != B
True,iAandBarenotidentical.
A < < B
True,iAisasubsetofB,butAandBarenotidentical.
A > > B
True,iAisasupersetofB,butAandBarenotidentical.
A <= B
True,iAisasubsetofBorAandBareidentical.
A >= B
True,iAisasupersetofBorAandBareidentical.
Table13.3: Binarysetoperatorsforcomparison
The assignments s implement the e computation n constructs s introduced d in 12. The e pure
assignment overwrites thetargetsetwiththe source set,commonlywith h value semantics,
creatingacopyofthesourceset.Onlyifalocalvariable(i.e. notanattribute)isassignedto
alocalvariable,isreferencesemanticsused(i.e.bothvariablespointafterwardstothesame
set). Compoundassignmentsareassignmentswhichusetherstsourceastarget,too,only
adaptingthetargetvalueinsteadofcomputinganewvalueandoverwritingthetargetwith
it. Forscalarsthisisnotsupported,butforcontainervaluedentitiesitisoeredduetothe
potentialformassivecomputationalcostsavings. Thecompoundassignmentstatementson
setsareasetunion|=,intersection&=anddierence\=assignment.
ChangeAssignment
-
=
-
>
-
|
-
>
-
&
-
>
-
NodeOrEdge
-
.
-
BoolAttribute
-
BoolVariable
-
VisitedFlag
-
C# Image Convert: How to Convert Adobe PDF to Jpeg, Png, Bmp, &
C# sample code for PDF to jpg image conversion. This demo code convert PDF file all pages to jpg images. C# sample code for PDF to jpg image conversion.
convert pdf pages to jpg; convert pdf file to jpg file
C# Image Convert: How to Convert Dicom Image File to Raster Images
RasterEdge.XDoc.PDF.dll. Conversion from Dicom to Jpeg Image. String inputFilePath = @"C:\input.dcm"; String outputFilePath = @"C:\output.jpg"; // Convert dicom
convert pdf file into jpg; pdf to jpeg
150
ContainerTypesandComputations
Thecompoundassignmentsonsetsandmapsmaybeenhancedwithachangeassignment
declaration.Thechangevalueistrueincasethetargetcollectionchangesandfalseincase
thetargetcollectionis notaltered. . The e assign-tooperator=> assignsthechange valueto
thespeciedtarget,theor-tooperator|>assignsthebooleandisjunctionofthechangevalue
targetwiththechangevaluetothechangevaluetarget,theand-tooperator &>assignsthe
booleanconjunctionofthechangevaluetarget withthechangevaluetothe changevalue
target. Thisadditionallows s forecientdata owcomputationsnotneedingtocheckfora
changebysetcomparison,see19.6.
TheSetConstructorextendstheLiteral from6.8(asarenementoftheContainerCon-
structorthere).Itisconstantifonlyprimitivetypeliterals,enumliterals,orconstantexpres-
sionsareused;thisisrequiredforcontainerinitializationsinthemodel. Itisnon-constantif
itcontainsnodes/edges/ormemberaccesses,whichmaybethecaseifusedintherules. The
elementsgiveninthetypeconstructorarecastedtothespeciedmembertypeifneededand
possible.
EXAMPLE(75)
Anexampleexplainingsomesetoperations.
1
functionsetExample(refsi:set<int>) :boolean
2
{
3
defrefs:set<int>= set<int>{};
4
s.add(1); // {1 }
5
s.add(2); // {1,2 }
6
s.add(3); // {1,2, 3 },s.size()==3
7
s.rem(2); // {1,3 }
8
for(v:int in s) {
9
si.add(v);
10
}//s == si == {1, 3 },assuminginput was{}
11
defvari:int= s.size();//i==2
12
if(!(i in s)) {
13
s.add(i);
14
}//{ 1, 2, 3}
15
s.add(3); //still{ 1, 2, 3}
16
return(2 in (s |set<int>{4,5})); //true
17
}
13.3 MapOperations
Mapexpressionsconsistof theknownmathematicalsetoperations extendedtomaps,and
mapvaluelookup,plussomeoperationsinmethodcallnotation.
MapExpr
-
PrimaryExpr
-
MethodSelector
-
Expr
-
in
-
MapExpr
-
MapExpr
-
[
-
Expr
-
]
-
MapExpr
-
MapOperator
-
MapExpr
-
JPEG to PDF Converter | Convert JPEG to PDF, Convert PDF to JPEG
similar software; Support a batch conversion of JPG to PDF with amazingly high speed; Get a compressed PDF file after conversion; Support
convert from pdf to jpg; convert online pdf to jpg
JPG to DICOM Converter | Convert JPEG to DICOM, Convert DICOM to
Open JPEG to DICOM Converter first; Load JPG images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "DICOM" in
convert pdf file to jpg on; convert pdf picture to jpg
13.3 MapOperations
151
MethodCall
-
MapEntity
-
MethodSelector
-
Assignment
-
MapEntity
-
=
-
MapExpr
-
IndexedAssignment
-
MapEntity
-
[
-
IndexExpr
-
]
-
=
-
Expr
-
CompoundAssignment
-
MapEntity
-
MapOperator
-
=
-
Expr
-
ChangeAssignment
-
MapConstructor
-
map
-
<
-
Type
-
,
-
Type
-
>
-
f
-
Expression
-
->
-
Expression
,
-
g
-
Thequerymethodcallsonmapsare:
.size()
returnsthenumberofelementsinthemap,asint
.empty()
returnswhetherthemapisempty,asboolean
.peek(num)
returns the e key of the element whichcomes at positionnum:int in the sequence of
enumeration,asSformap<S,T>;thehigherthenumber,thelongerretrievaltakes
.domain()
returnsthesetofelementsinthedomainofthemap,asset<S>formap<S,T>
.range()
returnsthesetofelementsintherangeofthemap,asset<T>formap<S,T>
.asArray()
returns anarrayofthemapcontent,as array<T>formap<int,T>(onlyavailablefor
domaintype int); gaps arelledwith the default value, upto themaximumindex
availableinthemap
Theupdatemethodcallsonmapsare:
Mapaddition:
m.add(k,v) adds the e pair r (k,v) ) to the map p m, , overwrites s the e old value e if f a pair
(k,unknown)wasalreadyexisting.
JPG to GIF Converter | Convert JPEG to GIF, Convert GIF to JPG
Open JPEG to GIF Converter first; Load JPG images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "GIF" in "Output
change pdf file to jpg; change pdf to jpg online
JPG to PNG Converter | Convert JPEG to PNG, Convert PNG to JPG
Open JPEG to PNG Converter first; Load JPG images from local folders in "File" in toolbar Windows Explorer; Select "Batch Conversion" & Choose "PNG" in "Output
convert pdf to jpg converter; convert pdf to 300 dpi jpg
152
ContainerTypesandComputations
Mapremoval:
m.rem(k)removesthepair(k,unknown)fromthemapm.
Mapclearing:
m.clear()removesallvaluesfromthemapm.
Thebinarymapoperatorsare:
|
Mapunion: returnsnewmapwithelementswhichareinatleastoneofthemaps,
withthevalueofmap2takingprecedence
&
Mapintersection: returnsnewmapwithelementswhichareinbothmaps,
withthevalueofmap1takingprecedence
\
Mapdierence: returnsnewmapwithelementsfrommap1
withouttheelementswithakeycontainedinmap2
Table13.4: Binarymapoperators,inascendingorderofprecedence
The binary mapoperators require the left andright operands to be of f identical l type
map<S,T>, withoneexceptionfor r mapdierence, , this s operator accepts for a leftoperand
oftypemap<S,T>arightoperandoftype set<S>,too. . Theoperator r x x in mdenotes s map
domainmembershipx 2 dom(m), returning whether the domainof the mapcontains the
givenelement,asboolean.ItisaO(1)operationformaps.Theoperatorm[x]denotesmap
lookup,i.e. itreturnsthevalueywhichisstoredinthemapmforthevaluex(domainvalue
xismappedbythemappingmtorangevaluey).Thevaluexmust beinthemap,i.e. . x in
mmusthold.Furthermore,thecontainermaybeiteratedoverwithaforloop,asintroduced
in12.3. Themaponlyallowsforindexediteration,withthekeygettingassignedtotheindex
variableandthecorrespondingvaluegettingassignedtothevaluevariable.
Therelationalexpressions(alreadyintroducedin6.4)usedtocompareentitiesofdierent
kinds,mappingthemtothetypeboolean,are extendedtosets accordingtotable13.5: A
mapAisasubmapofBiallkey-valuepairsofAarecontainedinB,too.Iftheyhaveakey
incommonbutmaptoadierentvalue,theycountasnotidentical.
A == B
True,iAandBareidentical.
A != B
True,iAandBarenotidentical.
A < < B
True,iAisasubmapofB,butAandBarenotidentical.
A > > B
True,iAisasupermapofB,butAandBarenotidentical.
A <= B
True,iAisasubmapofBorAandBareidentical.
A >= B
True,iAisasupermapofBorAandBareidentical.
Table13.5: Binarymapoperatorsforcomparison
The assignments s implement the e computation n constructs s introduced d in 12. The e pure
assignmentoverwritesthetargetmapwiththesourcemap,commonlywithvaluesemantics,
creatingacopyofthesourcemap.Onlyifalocalvariable(i.e.notanattribute)isassignedto
alocalvariable,isreferencesemanticsused(i.e.bothvariablespointafterwardstothesame
map). Theindexedassignmentm[i]=voverwritestheoldvalueatindexiinthemapmwith
thenewvaluev.Compoundassignmentsareassignmentswhichusetherstsourceastarget,
too,onlyadaptingthe target valueinsteadofcomputinganewvalue andoverwriting the
targetwithit. Forscalarsthisisnotsupported,butforcontainervaluedentitiesitisoered
due to o the potential l for r massive computational l cost t savings. . The e compound assignment
statementsonmapsareamapunion|=,intersection&=anddierence\=assignment.
The MapConstructor r extends s the Literal l from 6.8(as a renement t of the Container-
Constructor there). . Itis s constantifonlyprimitivetypeliterals,enumliterals,orconstant
expressions are used; ; this s is requiredfor container initializations inthemodel. . Itis s non-
constantifitcontainsnodes/edges/ormemberaccesses,whichmaybethecaseifusedinthe
13.4 ArrayOperations
153
rules. Theelementsgiveninthetypeconstructorarecastedtothespeciedmembertypes
ifneededandpossible.
EXAMPLE(76)
Anexampleexplainingsomemapoperations.
1
functionmapExample(refmi:map<int,int>):boolean
2
{
3
defrefm:map<int,int> =map<int,int>{};
4
m.add(1,1);//{ 1->1}
5
m.add(2,2);//{ 1->1, 2->2}
6
m.add(3,3);//{ 1->1, 2->2,3->3 }, m.size()==3
7
m.rem(2); // {1->1, 3->3}
8
for(k:int -> v:intinm){
9
mi.add(k,v);//mi[k]==m[k]
10
}//m == mi == {1->1, 3->3},assuminginputwas {->}
11
m[3]= m[1]; // m= {1->1,3->1 }
12
defvari:int= m.size();//i==2
13
if(!(i in m)) {
14
m.add(i,1);
15
}//{ 1->1, 2->1,3->1 }
16
m.add(3,3); // {1->1, 2->1, 3->3}
17
return(2 in (m |map<int,int>{4->4, 5->m[0]})); //true
18
}
13.4 ArrayOperations
Arrayexpressionsconsistofarraymembershipchecking,arrayvaluelookup,andarraycon-
catenation,plussomeoperationsinmethodcallnotation.
ArrayExpr
-
PrimaryExpr
-
MethodSelector
-
Expr
-
in
-
ArrayExpr
-
ArrayExpr
-
[
-
Expr
-
]
-
ArrayExpr
-
ArrayOperator
-
ArrayExpr
-
MethodCall
-
ArrayEntity
-
MethodSelector
-
Assignment
-
ArrayEntity
-
=
-
ArrayExpr
-
IndexedAssignment
-
ArrayEntity
-
[
-
IndexExpr
-
]
-
=
-
Expr
-
154
ContainerTypesandComputations
CompoundAssignment
-
ArrayEntity
-
ArrayOperator
-
=
-
Expr
-
ChangeAssignment
-
ArrayConstructor
-
array
-
<
-
Type
-
>
-
[
-
Expression
,
-
]
-
Thequerymethodcallsonarraysare:
.size()
returnsthenumberofelementsinthearray,asint
.empty()
returnswhetherthearrayisempty,asboolean
.peek(num)
returnsthevaluestoredinthearrayatpositionnum:intinthesequenceofenumeration,
isequivalentto(andimplementedby)a[num]);retrievaloccursinconstanttime.
.peek()
returnsthelastvaluestoredinthearray;retrievaloccursinconstanttime.
.indexOf(valueToSearchFor)
returnstherstpositionvalueToSearchFor:Tappearsat,asint,or-1ifnotfound
.indexOf(valueToSearchFor, startIndex)
returnstherstpositionvalueToSearchFor:Tappearsat(movingtotheend),when
westartthesearchforitatarraypositionstartIndex:int,asint,or-1ifnotfound
.lastIndexOf(valueToSearchFor)
returnsthelastpositionvalueToSearchFor:Tappearsat,asint,or-1ifnotfound
.lastIndexOf(valueToSearchFor, startIndex)
returnsthelastpositionvalueToSearchFor:Tappearsat(movingtothebegin),when
westartthesearchforitatarraypositionstartIndex:int,asint,or-1ifnotfound
.indexOfOrdered(valueToSearchFor)
returns apositionwherevalueToSearchFor:Tappearsat,asint,or-1ifnotfound.
Thearraymustbeordered,otherwisetheresultsreturnedbythebinarysearchemployed
willbewrong;incaseofmultipleoccurences,anarbitrayoneisreturned
.orderAscending()
returnsanarraywiththecontentoftheinputarrayorderedascendingly,onlyavailable
forbasictypes
.reverse()
returnsanarraywiththecontentoftheinputarrayreversed
13.4 ArrayOperations
155
.subarray(startIndex, length)
returnssubarrayofgivenlength:intfromstartIndex:inton
.asDeque()
returnsadequeofthearraycontent,asdeque<T>forarray<T>,insameorder
.asSet()
returnsaset(withoutorder)ofthearraycontent,asset<T>forarray<T>
.asMap()
returnsamapofthearraycontent,asmap<int,T>forarray<T>,thevaluesaremapped-
tobytheirindex
.asString(separator)
returnsthearrayimplodedtoastringwiththeseparator:stringinsertedinbetween
thesubstringsfromthearray,onlyavailableforarray<string>(astringcontainsan
asArraymethodforreversal)
Somequerymethodcallsareavailableonlyonarraysofnodeoredgetypesbearingattributes,
inspecting the value of f an attribute of the graph elements stored in the e array, , with the
attributedenedwiththeoperation,insteadofthevaluescontainedinthearraydirectly:
.indexOfBy<attr>(valueToSearchFor)
returnstherstpositionvalueToSearchFor:Tappearsat,asint,or-1ifnotfound
.indexOfBy<attr>(valueToSearchFor, startIndex)
returnstherstpositionvalueToSearchFor:Tappearsat(movingtotheend),when
westartthesearchforitatarraypositionstartIndex:int,asint,or-1ifnotfound
.lastIndexOfBy<attr>(valueToSearchFor)
returnsthelastpositionvalueToSearchFor:Tappearsat,asint,or-1ifnotfound
.lastIndexOfBy<attr>(valueToSearchFor, startIndex)
returnsthelastpositionvalueToSearchFor:Tappearsat(movingtothebegin),when
westartthesearchforitatarraypositionstartIndex:int,asint,or-1ifnotfound
.indexOfOrderedBy<attr>(valueToSearchFor)
returns apositionwherevalueToSearchFor:Tappearsat,asint,or-1ifnotfound.
Thearraymustbeordered,otherwisetheresultsreturnedbythebinarysearchemployed
willbewrong;incaseofmultipleoccurences,anarbitrayoneisreturned
.orderAscendingBy<attr>()
returnsanarraywiththecontentoftheinputarrayorderedascendingly;onlyavailable
foranattributeofbasictype,containedinanodeoredgetype,withthearraystoring
graphelementsofthattype.
Theupdatemethodcallsonarraysare:
Arrayaddition:
a.add(v)addsthevaluevtotheendofarraya.
Arrayaddition:
a.add(v,i)insertsthevaluevatindexitoarraya.
Arrayremoval:
a.rem()removesthevalueatthenendofthearraya.
156
ContainerTypesandComputations
Arrayremoval:
a.rem(i)removesthevalueatindexifromthearraya.
Arrayclearing:
a.clear()removesallvaluesfromthearraya.
Thebinaryarrayoperatorsare:
+
Arrayconcatenation: returnsnewarraywiththerightappendedtotheleftarray
theleftandrightoperandsmustbeofidenticaltypearray<T>
Table13.6: Binaryarrayoperators,inascendingorderofprecedence
Theoperatorx in adenotesarrayvaluemembership,returningwhetherthearraycon-
tains thegivenelement,asboolean. . ItisaO(n)operationforarrays. Theoperator r a[x]
denotesarraylookup,i.e.itreturnsthevalueywhichisstoredinthearrayaattheindexx.
Theindex xmust t beavalidarrayindex. . Furthermore,thecontainer r maybeiteratedover
withaforloop,asintroducedin12.3. Thearrayallowsfornon-indexedaswellasindexed
iteration;ifnon-indexediterationisusedthearrayvaluesareiteratedover,ifindexeditera-
tionisusedtheindexisassignedtotheindexvariableandthecorrspondingvalueisassigned
tothevaluevariable.
Therelationalexpressions(alreadyintroducedin6.4)usedtocompareentitiesofdierent
kinds,mappingthemtothetypeboolean,areextendedtosetsaccordingtotable13.7: An
array Ais asubarray of f Biit t is smaller or equalinsizeandthe values at eachcommon
indexareidentical(lexicographicorderasforstrings).
A == B
True,iAandBareidentical.
A != B
True,iAandBarenotidentical.
A < < B
True,iAisasubarrayofB,butAandBarenotidentical.
A > > B
True,iAisasuperarrayofB,butAandBarenotidentical.
A <= B
True,iAisasubarrayofBorAandBareidentical.
A >= B
True,iAisasuperarrayofBorAandBareidentical.
Table13.7:Binaryarrayoperatorsforcomparison
The assignments s implement the e computation n constructs s introduced d in 12. The e pure
assignmentoverwritesthetargetarraywiththesourcearray,commonlywithvaluesemantics,
creatingacopyofthesourcearray.Onlyifalocalvariable(i.e.notanattribute)isassignedto
alocalvariable,isreferencesemanticsused(i.e.bothvariablespointafterwardstothesame
array).Theindexedassignmenta[i]=voverwritestheoldvalueatindexiinthearrayawith
thenewvaluev.Compoundassignmentsareassignmentswhichusetherstsourceastarget,
too,onlyadaptingthe target valueinsteadofcomputinganewvalue andoverwriting the
targetwithit. Forscalarsthisisnotsupported,butforcontainervaluedentitiesitisoered
due to o the potential l for r massive computational l cost t savings. . The e compound assignment
statementonarraysistheconcatenationassignment+=.
TheArrayConstructor extends s the Literal l from6.8(as s arenementoftheContainer-
Constructor there). . Itis s constantifonlyprimitivetypeliterals,enumliterals,orconstant
expressions are used; ; this s is requiredfor container initializations inthemodel. . Itis s non-
constantifitcontainsnodes/edges/ormemberaccesses,whichmaybethecaseifusedinthe
rules. Theelementsgiveninthetypeconstructorarecastedtothespeciedmembertypes
ifneededandpossible.
Documents you may be interested
Documents you may be interested