datová struktura

Definice

DataStructureIsaCollectionOfDataelementswithStrucTuralCracteristics.Itstudiesthelogicalstructureofdataandthephysicalstructureofdata,aswellastheinteractionbetweenthemRelations,anddesignthecorrespondingcalculationsforthisstructuredefinition,andensurethatthenewstructureobtainedafterthesecalculationsstillmaintainstheoriginalstructuretype.Inshort, adatastructuresAcollectionOfDataelementshaveOneormoreSecific relationswiteahother, to je, acollectionOfdaelementswitha „struktura“.„Struktura“ odkazovatelná škola “.

TheLogicalStructuctuRuctuRuctureandStructurectureOfDataaretWocloselyRelatedatesPectSofThedastructure.ThesameLogicalStructuctuctureCancorRespondodifferentstoragestructures.TheDesignofThealgorithMDedSotheLogicalStructureofThedata, atherealizationofThealgorithMdependSontheSpecified Storagestructure.

TheresearchContentofDataStructureIsThebSisForConstructingComplexSoftWaresystems, aitscoreTechnologyisdeCompositionAbstraction.Thedatacanbedividedintothreelevelsthroughdecomposition;thenthroughabstraction,thespecificcontentofthedataelementsisdiscarded,andthelogicalstructureisobtained.Podobně, BydivingTheprocessingRequirements Intovarious -Functions athenbyabstractingawaytheimplementationDetails, thedefinitiontoftheoresained.THECOMBINACEFTHEABOVETWOASPLECTSCANTRANSFORMTHOBLIMINTIMENTIMENTOADATASTRUCTURE.ThisSaProcessFromConcrete (THEIS, CONCRETEPROBLEMS) TOABSTRACT (THEIS, DATAstruktury).Poté, concreatesTheCheCosiderationOfTheImplementationDetails, thestoragestructureandtheimplementationoperationrefurtherobtained, soastocompletetetedededesigntask.Tato řemeslná zástupce fromabstraction (to, že, datová struktura) na konkrétní (to, že je to, betonová realizace).

ResearchObject

TheLogicalStruktureofdata

Referenční referentaTastructurethatreflectsthelogicalRelationshipBetweendaetaelements.TheLogicalRelationshipsbetweendaelements.TherelationshipBetweenberoEReandafter, ahasnothingtodowiththeirstoragelocationenthecomputer.TheLogicalStructureIncludes:

1.Sada: V tom se bezpodmínerovaní beteentorementshelementsEnthedaTastructureCeccesCeccetualRelationships „patří“;

2.Lineární struktura: TheElementsThedaTaTastructurehave one-to-one;

3.Struktura stromu: TheElementsNetaTaTastructurehave one-many vztah;

4.Grafická struktura: TheElementSentEtaTastructurehave mnoho mezi nimi.

ThephysicalStructureofThedata

ReferstothestorageformFofTheLogicalStructureofThedaiTeTheComputerStorageSpace.

ThephysicalStructureOfDataIsToresentationOfThedastructucturetheChecomputer (alsoknownastheimage), který includestheinternalrepresentationOfdaelements ainternalrepresentingofrelationshipshipshipshipships.SinceerearemultIplesSpecificimplementationMethodssuchassEquence, odkaz, index, hash atd.., adatastructuctucturecanbeexpressedasoneormorestoragestruktury.

In-machinerePresentationOfdaelements (mappingMethod): ABitStringofBinaryBits (Bit) Is IsTorePresentDataelements.ThisKindofBitStringisusUsusAllyCalledanode.WhadataelementConsistsOnsOnsEraldataitEms, thesub-bitstringoreredvingtoeachDataintheBitStringIsCallEdadataField.Proto se tedy potom výsledek (orinternalimage) ofthedaetaelementu.

In-machinerepresentationOfRelationships (mappingMethod):.TWOCOMONMONLYUSEDStoragestructures: SequentialstoragestructuruCreandChainstoragestructure.SequenceMappinguSestHerelativePositionOfTheelementsIntheMoryTorePresentTheLogicalRelationshipBetweendaelements.NesequentialMappinguSeSpointersTsindicatestoragelocationsOfelementStorepresentLogicalRelationsBetweendaelements.

Datoragestructure

TheStorageformFtheLogicalStructurectureOfDataintheComputerstorageSpaceIscalledThephysicalStructureofThedata (alsocalledThestoragestructure).Obecně řečeno, TheLogicalStructureCuctureofadaTastructuctuctureCanBexpresseDavarityofstorageStructureCassAsneed.CommonStoragestructuresIncludeSequentialstorage, Chainstorage, Indexstorage, AndhashStorage.

ThechracteristicThesVyentialstoragestructureofdatais: theLogicalRelationshipBeenthedaeDementsExpressedBerelativePositionOfTheelemenTeMemory; theDataisexPressedBressedBressedbythepoInticationTheStorageDresolilationtresolilagelialialureLereLereLereLelialialialialialialialialialulagelialurelialialurelialurelialurelialusTresolialurelialushelialusTresolialialialu..

Klasifikace

ThereMeremanypesofDatastructures.Obecně řečeno, DataArecLassifiedSimpledcordingtotheirLogicalStruktura, včetně linearstructuctureandnon-linearstruktury.

Linearstruktura

Jednoduše zavádějte, alinearstructuremeansTateachNodeinthetableHasalinearRelationship.IFitisDescreatDenthelangageageofThedaTrastructure, thelinearstructureshouldCludeTheFollowingpoints:

1.ThelinearStructureisanon-EmptySet.

2.ThelinearstructurehasoneandonlyonestartnodeandoneendNode.

3.AlNodeSoftheLinearStructureHaveat -stononeDirectReDessornodeandoneDirectSuccessornode.

Lineartablesaretypicallinearstruktury, astacky, fronty a astringarealllinearstruktury.

Nelinearstruktura

Jednoduše, anonlinearstructuremeansTthereareMultiplecorrespondencesbetweenaechNodeinthetable.IfDeScredintheLanguageofDatastructure, pakOnLinearStructuresHouldCludeTheFollowingpoints:

1.ThenOnLinearStructureCureisanon-emptyset.

2.AnodeofanonLinearStructuremayhaveMulPleDirectPredessornodeSandMulplideRectSuccessornodes.

IntracticalApplication, Datastructuctureschasarrays, GeneralizedTables, Stromestructures a GrafRaphStructuresArealLNon-linearstruktury.

Běžně používané datastruktury

Během vývoje Computerscience, Datastructureshavealsoevolled.Běžně používaný DATaTastructuresinProgramdesignCludeTheFolling.

Pole (pole)

ArrayisanaggredatetaTaType, který secocollectionOfSeveraliablesofthThesaMeTypeorganizedTogerinaNorderlyManner.Arraycanbesaidtobethemostbasicdatastructure, která je -liresponspondovariousProgrammingLanguages.AnarraycanbedecomposedIntomultiPlearrayelements.Podle tearraycanbedIdIdIdIndointegerArrays, CharacterArrays, Floating-Point-PointArrays, PointerArrays a Structucturearrays.ArrayScAlsObeexpressedinon-dimenzionální, dvourozměrné a multi-dimenzionalformy.

Stack (zásobník)

Stackisaspeciallineartable.ItCanonlyInSersantDeleteDatanodesononeneFixeDendonAdovateble.TheStackStoresDataccordingtothelast-out-outprinciple, to je, thedatainsertedFirstWillBepSedTothebotTotHestack, athedatainserTedlastWillBeatthetopofTestackacka.WhendingData, itisReadoneBoneBoneFomThopofTheStack.TheStackiSoftenedforon-SITEPRETICTHOFIMPORTAntDatainaSemblyLanguageprogram.WhentesNodataInthestack, itiscalledaNemptyStack.

Fronta

The QuieueiSiSsiMilarTothestack, AndIsIsSalsoaspecialLeartable.Nelze nepravděpodobné, The FrontaOnlyallowSerSerToperationsOnoneendofTeableAbleteTeleteoperationsonheotherend.Obecně řečeno, theendthatformtHeinSertionOperationIscalledTetailoftheeueue a theendthatperformsthedeleteoperationIscalledtheheadofTofThequeueueueueueueueueueue.WhentereareelementsinTequeue, itiscalledaNemptyqueue.

Spojový seznam

Spojový seznamisadaTastructureInwhichdataelementSarestoredCordingtoachained Storagestructure.Tato školagestrukturaisphysicallynnon-kontinuální.TheSpojový seznamisComposeSeriesOfDatanodes, AndeachDatanodeincludestWoparts: DatafieldPointerfieldfield.Mezi těmto, ThePointerfieldHeaddressWheretheNextelemenTemenTheDetaStructuresStored.TheLogicalOrderofThedaetaelementsInTheLinkedStructureIsRealizedBethelinkorderofThepointerStheLetheSpojový seznam.

Strom

StromISATYPICALNONLINEARStructure, kteráisafiniteSetkincludingtwonodes.InthetReestructure, thresiseandonlyoNerootNode, který.AllothernodesintheestructurecrectureHaveoneandonlyOnePredesSornode, andtherecanbetwosuccessornodes, m≥0.

Graf

Grafisanothernon-lineardatastruktura.InthegraphStructure, Datanodesaregerallycalledvertices, AndedgesAreorderedPairsOfvertices.Pokud se jedná, itMeanstHatthetTetwoverticeshaveanadjacentRelationship.

Halda

HaldaisaspecialStrom-Shapeddatastructure a atheeapsgenerallyDiscussedarebinaryHaldas.THECHARACTERICOFTHEHEAPISTHATHEVALUEOFTOOOTOODEISTHESMALLestortheLergeTongAMONGALNODES, a THETWOSUBStromSoftherootNodearealsoaheapStructure.

Hashtable (hash)

ThehashTableIsderivedFomthe Hash Function (hashová funkce).TheideaiSthifThereisareCordwithheKeywordEqualTotinthestructure, pak toMusttherecordCanbefounTheStoragelocationOff (t), sothattheckeckedrecordcanberidectAined withuthacomparasoperisoperisoperisoperisoperisonaperation.

Běžně používanégoritmy

Thententofdatastructureresearch: howtoorganizethedataccordingtoActeAilLogicalStructure, a vychovává, že zaznamenáteretationPresentationMetHodTostorethethedaTataorganizedEllogicalStructureTothecoreCory upevňoval.KOMPOSOFEOFALTORTORITHMRESEARCHISTOPROCESSDATAMOREEFEFECTIVELYANDRETHETHEETHETHEFICIENTOFDATAOPERACE.TheoperationOfDataisDefinedonTheLogicalStructureofTheData, butthespecificRealizationFtheoperationMustBecRiriedOutONTheStoragestructure.Obecně platí, že toreareseveralComMonlyuseusesOperations:

(1) Hledat.RetrielistofindNodestHatmeetCiveConditionSintheDetaTastructure.Obecně, giventhevalueofacervefield, findThenodewiththevalueofThefield.

(2) Vložení.AddNewnodestotheDatastructure.

(3) Smazat.RemoveTheSpecifiedNodeFromThedaTastructure.

(4) Aktualizace.ChangethevalueofoneormorefieldsoftHecifiedNode.

(5) Seřazení.Zkurané položky.Například přírůstek nebo snížení.

Související články
HORNÍ