subject

The defense against the dark arts professor is in charge of this and the previous homework assignment. in these 2 assignments, students are learning about the basic wand operations that form the basis for one of the most useful and powerful spell-casting disciplines. as you know, every witch and wizard has a wand. the wand has a length and orientation (or direction). the manipulation of these two properties channels and magnifies the user's magic to create the various magical spell effects. thus, the wand can actually be seen as a vector in the space r" (yes, the kind of vector we learn about in calculus class) and the spells as simple linear algebra operations on these vectors. in the previous homework assignment, you wrote unit tests for a subset of the basic spells. in this homework assignment, you will implement those operations and perform some of the more powerful dark art defense spells. these spells are commonly used by scientists working in research laboratories addressing challenges such as weather forecasting, producing animated movies, designing more efficient batteries, or scheduling airline pilots in order to minimize flight departure delays. the spells you must implement are: 1. maximus : = determine the absolute maximum dimension of the wand." 2. sumus : = sum all dimensions of the wand.? 3. additus : = move and modify the dimensions of the wand. 4. duplicus = duplicate a wand configuration." 5. multiplus = determine a sort of similarity between two wand configurations.5 6. sizus : = determine the power of a wand. 7. grandus : = modify the power of a wand. 8. swapus : = exchange wand configurations. alias for amax. index of the first element with maximum absolute value. 2 alias for asum. sum of the absolute values of a vector's elements. 3 alias for axpy. add a scalar multiple of a vector, "a x plus y" (y = a*x + y). 4 alias for copy. copy vector x into vectory. 5 alias for dot. compute the dot product of two vectors. alias for norm2. compute the euclidean norm (i. e. magnitude, or length) of a vector. ? alias for scale. multiply a vector by a scalar (x = a*x). 3 alias for swap. swap vectors x and y. starter code start with the starter code. doing so will you with your with your implementation (ie., keeping the correct order and type for the parameters of spells) • • blas. h blas. cpp requirements when developing your solution to this problem, ensure that your submission conforms to the following requirements and assumptions: • name the source file containing the function definitions blas. cpp. a valid version of this file is included in the starter code. o you should start with the code provided and incrementally add your own code to implement the functions. • refer to blas. h for function declarations and descriptions. o avalid version of this file is included in the starter code. you can modify the file, but you do not need to, and therefore should not. • you will submit exactly two files: oblas. cpp oblas. h • you may use the following (and only the following) header files oiostream o cmath o blas. h comparing a signed value to an unsigned value (e. g. a loop variable, int i, and a length variable, unsigned int len), is generally unsafe. if either operand is unsigned, an unsigned comparison is used. this can cause problems (e. g. comparing a negative number to an unsigned number). because of this, the compiler (when so instructed) will complain about the comparison. the solution is to only do comparison between the same types of data (e. g. declare the loop variable as unsigned int i, instead). further, whenever a value should never be negative, it is good practice to declare the variable which holds it as unsigned (the exception being floating point numbers, which do not have a primitive unsigned type).

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Modern businesses use different technologies to accomplish work tasks
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
List 3 items that were on kens resume that should have been excluded
Answers: 1
You know the right answer?
The defense against the dark arts professor is in charge of this and the previous homework assignmen...
Questions
question
Social Studies, 14.07.2019 16:30
Questions on the website: 13722361