Lab 6: First hour

  • Returned exam and discussed related issues. Exam 1 solutions.
  • Spoke about academic misconduct.
    • High level discussion is acceptable collaboration on the problem sets. Copying of code is cheating, and will be reported.
  • Returned Project 1 Part 1, and worked through a couple example solutions to the primitives.
  • Talked about a possible overflow problem.
    def combine(wavs):
        output = zeros(len(wavs[0]))
        for i in range(len(wavs[0])):
            for a in range(len(wavs)):
                output[i] = output[i] + wavs[a][i]
        output = output/len(wavs)
        return output
  • Project 1 Part 2 will be returned next week.

Second Hour

  • Introduced percolation project.
  • A hint on percolation:
    search(input_grid, flow_grid, space):
      if space has flow or cannot flow:
      if space doesn't have flow and can flow:
        mark space with flow
        search neighbors (which neighbors depends on which type of percolation)
      initialize flow_grid to all ones
      search from every square in the top row
      check bottom row for flow
cs190c/lab6.txt · Last modified: 2008/07/24 12:10 by seh
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki