算法与数据结构回顾 – 广义表

算法与数据结构回顾 – 广义表

This article is also available in the following languages: English

图源:吟游诗人-狼娘 月巴小鹅 111776313

简述

广义表是线性表的一种推广。线性表要求表中元素拥有统一的类型,而广义表无此限制。需要注意的是,广义表和线性表长度一般认为是有限的,但广义表的深度可以是无限的(即递归表)。

广义表是一种数据结构。对广义表的常见操作包括:

  • 创建
  • 从字符串形式创建
  • 销毁
  • 复制
  • 取表头
  • 取表尾
  • 判空
  • 求长度
  • 求深度
  • 从表头插入
  • 从表头删除
  • 遍历

广义表是Lisp语言的基本数据结构。后文以Common Lisp和C++给出各基本操作的示例。

阅读更多
计算机图形学(1):感性认识

计算机图形学(1):感性认识

This article is also available in the following languages: English

图源:Magnet - Matcha_ 102235547

本系列笔记为结合了个人理解的非初学者向笔记,包括《CMU 15-462》、《Games 101:现代计算机图形学入门》、《Games 102:几何建模与处理》、《Introduction to 3D Game Programming with DirectX 12》等数个知识来源。

什么是计算机图形学

计算机图形学:利用计算机合成视觉信息或利用计算机合成/操控感官信息的学科。

计算机图形学的应用

  • 影视
  • 动画
  • 游戏
  • 数据可视化
  • 工业设计,平面设计
  • 数字绘画
  • 虚拟现实
    • 虚拟现实(VR):指所看到的一切均为虚拟的,比如虚拟现实游戏、虚拟现实视频等。
    • 增强现实(AR):指看到的是真实的现实 + 虚拟的、对当前现实进行分析处理或修改等生成的虚拟事物,比如Apple ARkit。
    • 混合现实(MR):VR + AR,使用类似VR的手段,达到AR这种结合当前现实与虚拟事物的效果,比如Hololens。
  • 制造业(3D打印)
  • 模拟与数字孪生
  • 排版与字体设计
    • “The Quick Brown Fox Jumps Over The Lazy Dog”:一句有意义的英文句子,内含全部的26个英文字母,常用来对字体(字形、字号、间距等)进行测试。
    • “Lorem ipsum dolor sit amet, consectetur adipisicing elit.”:又叫“乱数假文”或者“哑元文本”。主要的目的为测试文章或文字在不同字型、版型下看起来的效果。更多资料请查阅:https://cn.lipsum.com/
阅读更多
Algorithms and Data Structures – Generalized Lists

Algorithms and Data Structures – Generalized Lists

本文同时提供以下语言的翻译:中文

Image source: 八重神子的花嫁 月巴小鹅 126756408

Brief Introduction

A generalized list is an extension of a linear list. While a linear list requires all elements to be of the same type, a generalized list has no such restriction. It’s important to note that both generalized lists and linear lists are generally considered to have finite lengths, but the depth of a generalized list can be infinite (i.e., a recursive list).

A generalized list is a type of data structure. Common operations on generalized lists include:

  • Creation
  • Create from string form
  • Destroy
  • Copy
  • Get head
  • Get tail
  • Check if empty
  • Get length
  • Get depth
  • Insert at head
  • Delete from head
  • Traverse

Generalized lists are the fundamental data structure in Lisp. Examples of each basic operation are provided in Common Lisp and C++ in the following sections.

阅读更多
Computer Graphics (1) - Perceptual Understanding

Computer Graphics (1) - Perceptual Understanding

本文同时提供以下语言的翻译:中文

Image Source: Eden - Hiten 131135880

This series of notes is a non-beginner-oriented compilation that combines personal understanding, drawing from multiple knowledge sources including CMU 15-462, Games 101: Introduction to Modern Computer Graphics, Games 102: Geometric Modeling and Processing, and Introduction to 3D Game Programming with DirectX 12.

What is Computer Graphics

Computer Graphics: The discipline of using computers to synthesize visual information or to synthesize/manipulate sensory information.

Applications of Computer Graphics

  • Film and Television
  • Animation
  • Gaming
  • Data Visualization
  • Industrial Design, Graphic Design
  • Digital Painting
  • Virtual Reality
  • Virtual Reality (VR): Refers to everything seen being virtual, such as VR games, VR videos, etc.
  • Augmented Reality (AR): Refers to seeing the real world combined with virtual elements that analyze, process, or modify the current reality, such as Apple ARkit.
  • Mixed Reality (MR): VR + AR, using methods similar to VR to achieve the effect of AR, which combines the current reality with virtual elements, such as Hololens.
  • Manufacturing (3D Printing)
  • Simulation and Digital Twin
  • Typesetting and Font Design
    • “The Quick Brown Fox Jumps Over The Lazy Dog”: A meaningful English sentence containing all 26 letters of the alphabet, often used to test fonts (glyphs, font sizes, spacing, etc.).
    • “Lorem ipsum dolor sit amet, consectetur adipisicing elit.”: Also known as “random dummy text” or “placeholder text.” Its primary purpose is to test how articles or text appear in different fonts and layouts. For more information, please visit: https://cn.lipsum.com/.
阅读更多
现代C语言:C23标准中值得注意的变化

现代C语言:C23标准中值得注意的变化

图源:Anmi - 水族館 83088427

虽然没有固定标准,但一般将C99之后的C语言标准称为“现代C语言”;目前的最新标准为C23;

C23标准中值得注意的变化

以下是一部分我认为比较重要的变化,完整变化列表可以参阅 https://en.cppreference.com/w/c/23 或ISO标准文档。

替代

  • <assert.h>中的static_assert()宏被替代,变成了static_assert关键字;
  • <threads.h>中的thread_local()宏被替代,变成了thread_local关键字;
  • <time.h>中的ctime()函数弃用,请使用ctime_s()替代;
  • <time.h>中的asctime()函数弃用,请使用asctime_s()替代;
  • <stdnoreturn.h>_Noreturn标识符均弃用;
  • <stdalign.h>中的alignas()alignof()宏被弃用,请直接使用_Alignas_Alignof关键字;
阅读更多
Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×