Sequential Search in C++

Okay the sequential search is easier than the recursive and iterative binary searches, I figure I would include it to wrap up searches for now. For the sequential search, you loop through an array (or whatever data structure you are using) checking each position for the search value. Works just as well on sorted array lists as it does on unsorted array […]

Recursive Binary Search in C++

I wrote a recursive binary find that looks through a sorted array for a given number.  (You can use this on an unsorted array, it just isn’t as performant.) This is how it works, the recursive function call requires the number to search and the lowest and highest positions in a search range. To start, you give the low position, 0, […]

Error: identifier “cout” is undefined

I ran across the following issue when trying to compile my AztecOO source code outside of Trilinous. example/AztecOO/adapt_main.cpp(94): error: identifier “cout” is undefined cout << comm << endl; ^ example/AztecOO/adapt_main.cpp(94): error: identifier “endl” is undefined cout << comm << endl; ^ example/AztecOO/adapt_main.cpp(96): error: identifier “cerr” is undefined if(argc != 2) cerr << “error: enter name of data file on command […]

AztecOO catastrophic error: cannot open source file “Epetra_Map.h”

A while back I was trying to compile the AztecOO library outside of Trilinous. See this early post for more details. In doing so, I received the following error: catastrophic error: cannot open source file “Epetra_Map.h” Solution Aztec requires quite a few of the additional tilinous header files. I copied a couple addition src directories from trilinous to my Aztec […]

Catastrophic error: cannot open source file

A while back I was trying to compile the AztecOO library outside of Trilinous. See this early post for more details. In doing so, I received the following error: catastrophic error: cannot open source file “az_aztec.h” Solution This was a simple oversight on my part. To fix this, I added –I./src to the compile statement to make sure it looked […]

AztecOO: error: identifier “sswap_” is undefined

Error I’ve been trying to compile the AztecOO library outside of Trilinous. In doing so, I pulled the package Aztec source code from the Trilinous source code and opted to write my own Makefile to then compile it. My Makefile included the same settings reported in the Trilinous Makefile.export.AztecOO file. To prepare this build, I needed to fetch the AztecOO_config.h […]