Recent content by ecastro

  1. E

    C/C++ C++ Program Suddenly Ends after Reading Huge Data

    Hello, I haven't changed anything yet, the two snippets I have shown are part of the same algorithm, it just that "x" is being done in a function rather than in "main". However, I was successful in compiling the code in x64 and it's now working! :wink: But I would like to ask a few questions...
  2. E

    C/C++ C++ Program Suddenly Ends after Reading Huge Data

    Thank you for these insights! Now that you mention it, the code does end when the memory reaches 2GB, so this might indeed be the problem and I need to compile it in x64 (which I still need to learn how; I'm still a novice in these kinds of things :-p) The "x" array is indeed deleted after I...
  3. E

    C/C++ C++ Program Suddenly Ends after Reading Huge Data

    Thank you for all the replies! I have increased the heap reserve size to 50,000,000 and it still doesn't work. I counted the exact number of data points present through another program and it matches the number of data points that was stored in the vector, which I think means that allocating...
  4. E

    C/C++ C++ Program Suddenly Ends after Reading Huge Data

    Sorry about this. Here is a snippet of the code. ifstream file; ofstream save_file1, save_file2; string file_name, line, file_cc, file_df; double J, min_J; int* c = nullptr; int* min_c = NULL; int data_point; int num_data = 0; double prog = 0...
  5. E

    C/C++ C++ Program Suddenly Ends after Reading Huge Data

    I have written a C++ code in Visual Studio 2019 that requires an input tab-delimited text file and outputs a text file that is also tab-delimited. The data within the text file are stored in a vector and then it will perform calculations, whose results will then be written in a text file as...
  6. E

    How to Use a Multidimensional Array to SED?

    Unfortunately, the problem still persists.
  7. E

    How to Use a Multidimensional Array to SED?

    I have a .dat file which contains an ##m \times n## (specifically, a ##9 \times 2##) array and I have a file which has this kind of format, variable_x xx variable_y yy where xx and yy are numbers (I'll call this file the input_file). This file serves as an input to an external program, which I...
  8. E

    Find the Maximum of a Multi-variable Taylor Series

    Thank you for your reply! Actually, I am trying to understand the SIFT algorithm and trying to write it in code; it interpolates the neighbourhood of a pixel using the first three terms of the Taylor series. I am pretty much interested in the local extremum point, but I was curious for the...
  9. E

    Find the Maximum of a Multi-variable Taylor Series

    Thank you for the confirmation. I arrived at this solution, assuming that ##\left(a, b, c\right) = \left(0, 0, 0\right)## (for short-writing), \begin{align*} 0 &= \begin{bmatrix}\frac{\partial}{\partial x} \\ \frac{\partial}{\partial y} \\ \frac{\partial}{\partial z}\end{bmatrix} f\left(0, 0...
  10. E

    Find the Maximum of a Multi-variable Taylor Series

    Firstly, the matrix notation of the series is, \begin{align*} f\left(x, y, z\right) &= f\left(a, b, c\right) + \left(\mathbf{x} - \mathbf{a}\right)^T \frac{\partial f\left(a, b, c\right)}{\partial \mathbf{x}} + \frac{1}{2}\left(\mathbf{x} - \mathbf{a}\right)^T \frac{\partial^2 f\left(a, b...
  11. E

    Curiosity about why this is not a Function composition

    Is there any particular reason why we should flip signs? Oh, I never thought of this. Thanks!
  12. E

    Curiosity about why this is not a Function composition

    Homework Statement If ##f\left(x\right) = x^2 + 2x + 2##, find two functions ##g## for which ##\left(f \circ g\right)\left(x\right) = x^2 - 4x + 5##. Homework Equations If ##f\left(x\right) = x^2 + 2x + 2##, then ##\left(f \circ g\right)\left(x\right) = g\left(x\right)^2 + 2g\left(x\right) +...
  13. E

    Relationship between Reflectance and Albedo

    This is one of the confusions I had, so if I integrate along all directions of the incoming and reflected radiation, it is the albedo? Is this correct? If the Fresnel Coefficient "reflectivity" is indeed equal to the "reflectance" to what I had in mind before, does that mean that if I integrate...
  14. E

    Relationship between Reflectance and Albedo

    I think this indeed the case, but I am more concerned about the general term "albedo", or does albedo is concerned with long wavelength radiation? Is there no such thing as an albedo for visible or ultraviolet radiation? I think what you are referring to as "reflectivity" is a coefficient from...
  15. E

    Relationship between Reflectance and Albedo

    Thank you for your reply. I did read about the albedo being used in astronomical bodies, but I first encountered this term in a topic regarding the Earth's radiation budget, and on remote sensing. So I want to know its interpretation on terrestrial objects. As an addition, I have encountered...
Back
Top