正在加载图片...
6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Streams-a different way of structuring Slide 17.5.2 OR-have each object output a continuous stream of There is a very different way of thinking about such systems however. Rather than having structures that capture state explicitly, I could think about systems in which the state tennis ball being thrown against a set of walls, imagine tha of a information is only there in an implicit way. In my example while doing that action, I also include a set of cameras placed around the edges of the room. These cameras might record the movement of the ball, and thus can capture information about the state of the ball. In particular, imagine that this is happening in a continuous fashion That is. there is a constant stream of information being spewed out that represents the x and y position(for example)of the ball as it moves around the room Slide 17.5.3 Streams-a different way of structuring Under this view, my basic units now become the time series ofcomputation values of the different variables that represent my system. In the information ach object output a continuous stream of earlier version, my basic units were the objects themselves: the State of the simulation captured in the history(or stream)of values ball. the walls and the clock Now, I have changed my viewpoint. I have pulled out the state ables, and declared that my basic unit (or history)of values associated with each state variable. To capture the state of the system at any point, I simply take the values of all of those variables across the same point in time But my units that I want to focus on are the actual stream of values, the time history of values associated with each state6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 17.5.2 There is a very different way of thinking about such systems, however. Rather than having structures that capture state explicitly, I could think about systems in which the state information is only there in an implicit way. In my example of a tennis ball being thrown against a set of walls, imagine that while doing that action, I also include a set of cameras placed around the edges of the room. These cameras might record the movement of the ball, and thus can capture information about the state of the ball. In particular, imagine that this is happening in a continuous fashion. That is, there is a constant stream of information being spewed out that represents the x and y position (for example) of the ball as it moves around the room. Slide 17.5.3 Under this view, my basic units now become the time series of values of the different variables that represent my system. In the earlier version, my basic units were the objects themselves: the ball, the walls, and the clock. Now, I have changed my viewpoint. I have pulled out the state variables, and declared that my basic units are now the stream (or history) of values associated with each state variable. To capture the state of the system at any point, I simply take the values of all of those variables across the same point in time. But my units that I want to focus on are the actual stream of values, the time history of values associated with each state variable in my system
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有