Hi, I have an assignment. There are many options you could choose easiest one for you. I would really appreciate your help.
Since this assignment is open ended, your comments and documentation are extremely important. To run your functions and evaluate your submission, I will need to know what it does and what the background is. I'll request a resubmission if I can't understand what you are doing.
You may even include a third file called ReadMe that explains how I should load your files and some typical commands I might issue to demonstrate the functions.
Remember, you must submit something by the initial due date. If it is not working correctly, (or I can't understand it) I'll give you some feedback and you can then submit a corrected version soon after that.
This assignment is very open ended. You can select your own subject matter, preferably one connected to your own major or interests. You are required to illustrate the use of ONE of the following data structures:
arrays (or vectors or matrices)
You must select a data structure which is appropriate to your subject matter. If you are using property lists, hash-tables or structures, you will probably want to set up a knowledge base in a separate file, in order to avoid having to create many individuals by hand. You may also wish to do this with array structures, but it may not be appropriate.
You must define at least three major functions to manipulate or access data in your structure, or to implement tasks. (You may need some additional utility or auxiliary functions.) Use as many as you need of the built-in functions for your choice of data structure in order to build your own specialized functions, but don't just duplicate what is provided.
Here are some examples. (If you absolutely can't think of something of your own, you may use one of these. However, I should NOT receive two assignment submissions that are the same!)
Image processing example
An image is a two dimensional array of intensities (or even colors), with some "imperfections", usually isolated values that differ from their neighbors. Write one or two functions that enhance or correct these errors by a method (or methods) that you choose. For example, a value might be erroneous if it differs greatly from the mean of its 8 neighbors. Thus correcting it may mean assigning it the mean (or median) of its neighbors. You could use the function sort to find the median.
You often need matrix operations such as multiplication, addition, transpose, etc. in your work. Decide how you are going to represent a matrix, and implement several matrix operations. Even in this case, you may want to supply a file of pre-defined matrices to test your operations on.
Define points and vectors in 3-space as vectors, and then implement such functions as magnitude of a vector, norm of a vector, distance (between two points), dot product, cross product, etc. In this case, a separate knowledge base is less useful.
Set up some hierarchy of classes involving inherited attributes as suggested in exercise 4 of chapter 7, and provide some access functions. For example, inherit-get, all-items-with, etc.
Utilize your knowledge of search methods: set up a database of cities and the distances between them by specific roads. This could be as an adjacency matrix (enhanced by city names) or as a property list. Write functions which, given two cities, will suggest a path from one to the other if one exists. Or, will find the shortest path from one to the other, if you want to try search methods.
NEW assignment(pls let me know someone do this)
Turn your lab4 into a program that you can run off of the command line. Basically, you need to be able to run it something like this:
and have it do its thing... command line arguments and the whole bit are possibilities. I recommend that you do it thus:
Compile your lab5.lisp and any other helper files. See the COMPILE-FILE function.
Start up your Lisp, and from the top level, load your lab5.lisp and any helpers.
Create a new function that will start your application if you don't already have one, something like RUN-LAB5 that, when evaluated, will make sure everything happens properly.
Dump a memory image of your Lisp. For CMUCL, see the function EXTENSIONS:SAVE-LISP for details. The Web documentation of CMUCL describes the function in detail. http://www.pmsf.de/pub/cmucl/doc/cmu-user/extensions.html#toc48. Be sure that when you invoke EXTENSIONS:SAVE-LISP that you specify your :init-function... RUN-LAB5 would be appropriate. :-) For CLISP, which I recommend, look at EXT::SAVEINITMEM.
Write a shell script called lab5 that will start up your Lisp with the right options. Something like this would be good:
/usr/contrib/bin/clisp -q -Mfoo.mem
After you have a lab5 shell script with the code above, you need to change the permissions. chmod 755 lab5
that's the assignment. and you can find the lab 4 under this....
; In this lab, I tried to implement some Matrix Operations,
; These are the only matrix operations that I remember from
; the freshman year.
; The code will print out the row count
(defun matrix-rows (matrix)
; The code will print out the column count
(defun matrix-columns (matrix)
(length (first matrix)))
; Zero Matrix (A x B)
; This function will crate matrixes full of zeros,
; depends on the input (A x B)
(defun zero-matrix (m n)
(let ((result nil))
(dotimes (i m)
(push (make-list n :initial-element 0) result))
; Multiplication of Two Matrixes
; The function will print out
; I preferred flet instead of let because flet makes let like binding
; instead of variables. Otherwise, it returns illegal veriable error.
(defun mul-matrix (a b)
(flet ((col (mat i) (mapcar #'(lambda (row) (elt row i)) mat))
(row (mat i) (elt mat i)))
(loop for row from 0 below (length a)
collect (loop for col from 0 below (length (row b 0))
collect (apply #'+ (mapcar #'* (row a row) (col b col)))))))
; Merging Two Macrices
; Number of Rows must be equal to be able to merge them,
; thus, the code will check rows of the matrices.
; If they are not equal, an error code will show up.
; Otherwise, the program will run.
(defun merge-matrix (matrix-1 matrix-2)
(if (not (or (eql (matrix-rows matrix-1) (matrix-rows matrix-2)) (null matrix-1) (null matrix-2))) (error "Invalid dimensions."))
((null matrix-1) (copy-tree matrix-2))
((null matrix-2) (copy-tree matrix-1))
(t (let ((result (copy-tree matrix-1)))
(dotimes (i (matrix-rows matrix-1))
(setf (nth i result) (nconc (nth i result) (nth i matrix-2))))
The Language will be in Common Lisp - CLISP...
I am going to attach the assignment... and What I submitted for lab4 ... I'm also going to attach lab4 assignment so you can get the idea..It's in word format..
By the way, I don't want something so fancy. Just the requirements... ok...
Bu iş için 4 freelancer ortalamada $59 teklif veriyor
Hello, I'm interested in your project, Please check PMB for more details.
hello, I am coding in c/c++,java for over 6 years and implemented several data structures including all of these wanted in the assignment. I can start right now and complete in a few hours. thanks
Dear Client, I an much familiar with Lisp programming and can help you out with the assignment work. Please get back to me as soon as possible if you need my help. With Regards, Koustav