Vector Programming Using Structural Recursion

CoRR Pub Date : 2018-05-11 DOI:10.4204/EPTCS.270.1
M. Morazán
{"title":"Vector Programming Using Structural Recursion","authors":"M. Morazán","doi":"10.4204/EPTCS.270.1","DOIUrl":null,"url":null,"abstract":"Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source for frustration to many students given that they feel left adrift when it comes to resolving vector indexing errors. Even though the size of a vector is a natural number, there have been no efforts to define a useful recursive data definition to help beginners design vector processing functions. This article defines the concept of a vector interval and describes how to exploit its recursive structure to design vector processing functions. The described methodology provides a context beginners can use to reason about proper vector indexing instead of leaving them adrift with this responsibility. A key feature of properly using the described methodology is that if students process the correct vector interval then vector indexing errors can not arise. The classroom deployment of this approach is described in detail. Students, to date, have found vector intervals helpful in avoiding out-of-bounds indexing errors when all the vector elements of the interval are processed.","PeriodicalId":10720,"journal":{"name":"CoRR","volume":"85 1","pages":"1-17"},"PeriodicalIF":0.0000,"publicationDate":"2018-05-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"CoRR","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.270.1","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

Vector programming is an important topic in many Introduction to Computer Science courses. Despite the importance of vectors, learning vector programming is a source for frustration to many students given that they feel left adrift when it comes to resolving vector indexing errors. Even though the size of a vector is a natural number, there have been no efforts to define a useful recursive data definition to help beginners design vector processing functions. This article defines the concept of a vector interval and describes how to exploit its recursive structure to design vector processing functions. The described methodology provides a context beginners can use to reason about proper vector indexing instead of leaving them adrift with this responsibility. A key feature of properly using the described methodology is that if students process the correct vector interval then vector indexing errors can not arise. The classroom deployment of this approach is described in detail. Students, to date, have found vector intervals helpful in avoiding out-of-bounds indexing errors when all the vector elements of the interval are processed.
使用结构递归的向量编程
向量编程是许多计算机科学导论课程中的一个重要主题。尽管矢量很重要,但对于许多学生来说,学习矢量编程是一个挫败感的来源,因为他们在解决矢量索引错误时感到茫然。尽管向量的大小是一个自然数,但是还没有定义一个有用的递归数据定义来帮助初学者设计向量处理函数。本文定义了向量区间的概念,并描述了如何利用其递归结构来设计向量处理函数。所描述的方法提供了一个背景,初学者可以使用它来推断适当的向量索引,而不是让他们在这个责任上漂泊。正确使用所描述的方法的一个关键特征是,如果学生处理正确的向量间隔,那么向量索引错误就不会出现。详细描述了该方法的课堂部署。到目前为止,学生们已经发现,当处理区间的所有向量元素时,向量区间有助于避免超出范围的索引错误。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信