Enviar búsqueda
Cargar
Lec3
•
Descargar como PPT, PDF
•
0 recomendaciones
•
304 vistas
Ibrahim El-Torbany
Seguir
Tecnología
Educación
Denunciar
Compartir
Denunciar
Compartir
1 de 13
Descargar ahora
Recomendados
Lec3
Lec3
Saad Gabr
Tree
Tree
guest917885e
Pooja
Pooja
Ravi Ramchandani
Array- queues3
Array- queues3
Rajendran
PyData NYC whatsnew NumPy-SciPy 2019
PyData NYC whatsnew NumPy-SciPy 2019
Ralf Gommers
Numpy
Numpy
Jyoti shukla
Standardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for Python
Ralf Gommers
Data Applied: Clustering
Data Applied: Clustering
DataminingTools Inc
Recomendados
Lec3
Lec3
Saad Gabr
Tree
Tree
guest917885e
Pooja
Pooja
Ravi Ramchandani
Array- queues3
Array- queues3
Rajendran
PyData NYC whatsnew NumPy-SciPy 2019
PyData NYC whatsnew NumPy-SciPy 2019
Ralf Gommers
Numpy
Numpy
Jyoti shukla
Standardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for Python
Ralf Gommers
Data Applied: Clustering
Data Applied: Clustering
DataminingTools Inc
Introduction to numpy
Introduction to numpy
Gaurav Aggarwal
NumPy
NumPy
AbhijeetAnand88
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
r-kor
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
Experfy
Data Analysis in Python-NumPy
Data Analysis in Python-NumPy
Devashish Kumar
Pointer to array and structure
Pointer to array and structure
sangrampatil81
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
Databricks
20190927 generative models_aia
20190927 generative models_aia
Yi-Fan Liou
Numpy
Numpy
ToniyaP1
Introduction linked list
Introduction linked list
MohammedShameer28
Machine teaching tbo_20190518
Machine teaching tbo_20190518
Yi-Fan Liou
Snm Tauctv
Snm Tauctv
FNian
Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)
PyData
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Sunghoon Joo
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
Edureka!
Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure
Anand Ingle
NumPy/SciPy Statistics
NumPy/SciPy Statistics
Enthought, Inc.
Python array API standardization - current state and benefits
Python array API standardization - current state and benefits
Ralf Gommers
Lec4
Lec4
Ibrahim El-Torbany
Lec5
Lec5
Ibrahim El-Torbany
Lec4
Lec4
Saad Gabr
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
sabithabanu83
Más contenido relacionado
La actualidad más candente
Introduction to numpy
Introduction to numpy
Gaurav Aggarwal
NumPy
NumPy
AbhijeetAnand88
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
r-kor
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
Experfy
Data Analysis in Python-NumPy
Data Analysis in Python-NumPy
Devashish Kumar
Pointer to array and structure
Pointer to array and structure
sangrampatil81
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
Databricks
20190927 generative models_aia
20190927 generative models_aia
Yi-Fan Liou
Numpy
Numpy
ToniyaP1
Introduction linked list
Introduction linked list
MohammedShameer28
Machine teaching tbo_20190518
Machine teaching tbo_20190518
Yi-Fan Liou
Snm Tauctv
Snm Tauctv
FNian
Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)
PyData
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Sunghoon Joo
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
Edureka!
Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure
Anand Ingle
NumPy/SciPy Statistics
NumPy/SciPy Statistics
Enthought, Inc.
Python array API standardization - current state and benefits
Python array API standardization - current state and benefits
Ralf Gommers
La actualidad más candente
(18)
Introduction to numpy
Introduction to numpy
NumPy
NumPy
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
Data Analysis in Python-NumPy
Data Analysis in Python-NumPy
Pointer to array and structure
Pointer to array and structure
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
Streaming Random Forest Learning in Spark and StreamDM with Heitor Murilogome...
20190927 generative models_aia
20190927 generative models_aia
Numpy
Numpy
Introduction linked list
Introduction linked list
Machine teaching tbo_20190518
Machine teaching tbo_20190518
Snm Tauctv
Snm Tauctv
Introduction to NumPy (PyData SV 2013)
Introduction to NumPy (PyData SV 2013)
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
PR-272: Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure
NumPy/SciPy Statistics
NumPy/SciPy Statistics
Python array API standardization - current state and benefits
Python array API standardization - current state and benefits
Similar a Lec3
Lec4
Lec4
Ibrahim El-Torbany
Lec5
Lec5
Ibrahim El-Torbany
Lec4
Lec4
Saad Gabr
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
sabithabanu83
DSA 1- Introduction.pdf
DSA 1- Introduction.pdf
AliyanAbbas1
cs8251 unit 1 ppt
cs8251 unit 1 ppt
praveenaprakasam
Lec8
Lec8
Saad Gabr
lecture02-cpp.ppt
lecture02-cpp.ppt
ssuser0c24d5
lecture02-cpp.ppt
lecture02-cpp.ppt
nilesh405711
lecture02-cpp.ppt
lecture02-cpp.ppt
YashpalYadav46
lecture02-cpp.ppt
lecture02-cpp.ppt
DevliNeeraj
c++ Unit I.pptx
c++ Unit I.pptx
Kongunadu College of Engineering and Technology
Lec5
Lec5
Saad Gabr
b,Sc it data structure.pptx
b,Sc it data structure.pptx
classall
algo 1.ppt
algo 1.ppt
example43
DS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptx
prakashvs7
Data Structures_Introduction
Data Structures_Introduction
ThenmozhiK5
Lecture1
Lecture1
satendrakumar499728
Fundamentals of Programming in C++.ppt
Fundamentals of Programming in C++.ppt
AamirShahzad527024
Introduction to DS.pptx
Introduction to DS.pptx
OnkarModhave
Similar a Lec3
(20)
Lec4
Lec4
Lec5
Lec5
Lec4
Lec4
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
DSA 1- Introduction.pdf
DSA 1- Introduction.pdf
cs8251 unit 1 ppt
cs8251 unit 1 ppt
Lec8
Lec8
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
lecture02-cpp.ppt
c++ Unit I.pptx
c++ Unit I.pptx
Lec5
Lec5
b,Sc it data structure.pptx
b,Sc it data structure.pptx
algo 1.ppt
algo 1.ppt
DS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptx
Data Structures_Introduction
Data Structures_Introduction
Lecture1
Lecture1
Fundamentals of Programming in C++.ppt
Fundamentals of Programming in C++.ppt
Introduction to DS.pptx
Introduction to DS.pptx
Más de Ibrahim El-Torbany
Idea2
Idea2
Ibrahim El-Torbany
Cpp lernaufgabe linked_list
Cpp lernaufgabe linked_list
Ibrahim El-Torbany
C++ examples &revisions
C++ examples &revisions
Ibrahim El-Torbany
Lec6 mod linked list
Lec6 mod linked list
Ibrahim El-Torbany
Lec2
Lec2
Ibrahim El-Torbany
Lec2&3 data structure
Lec2&3 data structure
Ibrahim El-Torbany
Lec1
Lec1
Ibrahim El-Torbany
Ass logic
Ass logic
Ibrahim El-Torbany
Math lecture 4 Part 1
Math lecture 4 Part 1
Ibrahim El-Torbany
Tutorial 1
Tutorial 1
Ibrahim El-Torbany
Lec2&3_DataStructure
Lec2&3_DataStructure
Ibrahim El-Torbany
Lecture 2 math 2
Lecture 2 math 2
Ibrahim El-Torbany
Lec1
Lec1
Ibrahim El-Torbany
Chapter 1 what is statistics
Chapter 1 what is statistics
Ibrahim El-Torbany
Más de Ibrahim El-Torbany
(14)
Idea2
Idea2
Cpp lernaufgabe linked_list
Cpp lernaufgabe linked_list
C++ examples &revisions
C++ examples &revisions
Lec6 mod linked list
Lec6 mod linked list
Lec2
Lec2
Lec2&3 data structure
Lec2&3 data structure
Lec1
Lec1
Ass logic
Ass logic
Math lecture 4 Part 1
Math lecture 4 Part 1
Tutorial 1
Tutorial 1
Lec2&3_DataStructure
Lec2&3_DataStructure
Lecture 2 math 2
Lecture 2 math 2
Lec1
Lec1
Chapter 1 what is statistics
Chapter 1 what is statistics
Último
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
Nathaniel Shimoni
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
MounikaPolabathina
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
Zilliz
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
HarshalMandlekar2
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
BkGupta21
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
Último
(20)
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
Training state-of-the-art general text embedding
Training state-of-the-art general text embedding
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
How to write a Business Continuity Plan
How to write a Business Continuity Plan
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
Lec3
1.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 1 Data Structures and Abstract Data Types Chapter 3
2.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 2 Chapter Objectives • Look at ADTs, implementations in detail • Introduce arrays as ADTs • See arrays implemented as C++ static arrays • (Optional) Describe multidimensional arrays • Extend pointers to use in dynamic arrays • (Optional) Show use of C++ structs to model objects with multiple attributes • Show example of procedural programming paradigm
3.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 3 Dynamic Arrays • Recall earlier mention of arrays being fixed size at compile time – Space wasted by unused elements – Program cannot adjust if size set too small • Dynamic (run time) allocation mechanism provided – Acquire memory as needed – Release memory when no longer needed • C++ commands –new and delete
4.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 4 The new Operator • Syntax for arrays new Type [capacity] • This command issues a run-time request for a block of memory – Asks for enough memory for the specified number of elements of the stated type • Example int *arrayPtr; arrayPtr = new int[6];
5.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 5 Pointer Arithmetic • Possible to alter pointer contents – The pointer is a variable – It is not a pointer constant like an array name • Example Given: • Then ptr++;
6.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 6 The delete Operation • Counterpart to the new operation • Requests memory be returned to the heap – Can then be reused by later allocations • Syntax delete pointerVariable; delete [ ] arrayPointerVariable; • Frees the dynamically memory whose address is stored in the variable – Does not delete the variable
7.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 7 Memory Leaks • Important for programmer to make sure to deallocate memory originally allocated by new • What if new is called again for intPtr? • Originally allocated memory now cannot be accessed, nor is it available for reallocation
8.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 8 Aggregate Data Types • Predefined types not always adequate to model the problem – When objects have multiple attributes – When objects have collections of heterogeneous elements • C++ provides structs and classes – Create new types with multiple attributes
9.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 9 Structures • Characteristics – has a fixed size – is ordered – elements may be of different size – direct access of elements by name (not index) struct Date { int month, day, year; char dayOfWeek [12]; };
10.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 10 FAQs about Structures • structs can be nested (can contain struct objects) • Access members with – name of struct object – dot (member selector operator) . – name of struct member Date today = { 3, 4, 2005, "Tuesday"); cout << today.month;
11.
Array of Structures const
int MAX_SIZE = 500; enum HealthType { POOR, FAIR, GOOD, EXCELLENT }; struct AnimalType // Declares struct type { long id; string name; string genus; string species; string country; int age; float weight; HealthType health; }; AnimalType animalZoo[MAX_SIZE]; // Declares array Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 11
12.
Nyhoff, ADTs, Data
Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 12 AnimalType animalZoo[MAX_SIZE]; 12 animalZoo [0] [1] . . . . . . [498] [499] animalZoo[0].id 3456219 animalZoo[0].name “camel” animalZoo[0].genus “Camelus” animalZoo[0].species “specs” animalZoo[0].country “India” animalZoo[0].age 10 animalZoo[0].weight 992.8 animalZoo[0].health Fair
13.
Find total weight
of all elements of the animalZoo array float total = 0.0; for (j = 0; j < MAX_SIZE; j++) total += animalZoo[j].weight; Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved. 0-13-140909-3 13
Descargar ahora