mightymandel v16

GPU-based Mandelbrot set explorer

ref_set.h File Reference

(v16)

Collection of reference coordinates. More...

#include <stdbool.h>
#include <mpfr.h>
+ Include dependency graph for ref_set.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ref_set_node
 A node in the reference set. More...
struct  ref_set
 A set of references. More...

Functions

struct ref_setref_set_new ()
 Create a new reference set.
void ref_set_delete (struct ref_set *s)
 Create a new reference set.
void ref_set_insert (struct ref_set *s, const mpfr_t x, const mpfr_t y)
 Insert a point into a reference set.
bool ref_set_contains (const struct ref_set *s, const mpfr_t x, const mpfr_t y)
 Check if a point is in a reference set.

Detailed Description

Collection of reference coordinates.

Definition in file ref_set.h.


Data Structure Documentation

struct ref_set_node

A node in the reference set.

Should be read-only outside ref_set.c.

Definition at line 21 of file ref_set.h.

+ Collaboration diagram for ref_set_node:
Data Fields
struct ref_set_node * next The next node in the list, or 0.
mpfr_t x The real coordinate of the reference.
mpfr_t y The imaginary coordinate of the reference.
struct ref_set

A set of references.

Should be read-only outside ref_set.c.

Definition at line 32 of file ref_set.h.

+ Collaboration diagram for ref_set:
Data Fields
struct ref_set_node * set The list of references, or 0 if empty.

Function Documentation

bool ref_set_contains ( const struct ref_set s,
const mpfr_t  x,
const mpfr_t  y 
)

Check if a point is in a reference set.

Parameters
sThe reference set.
xThe real coordinate of the reference.
yThe imaginary coordinate of the reference.
Returns
true when the set contains the reference, false otherwise.

Definition at line 73 of file ref_set.c.

References ref_set_node::next, ref_set::set, ref_set_node::x, and ref_set_node::y.

Referenced by find_ref(), and fpxx_start().

+ Here is the caller graph for this function:

void ref_set_delete ( struct ref_set s)

Create a new reference set.

Parameters
sThe reference set to delete.

Definition at line 31 of file ref_set.c.

References debug_message, ref_set_node::next, ref_set::set, ref_set_node::x, and ref_set_node::y.

Referenced by render_calculate().

+ Here is the caller graph for this function:

void ref_set_insert ( struct ref_set s,
const mpfr_t  x,
const mpfr_t  y 
)

Insert a point into a reference set.

You should check membership before insertion to avoid duplicates.

Parameters
sThe reference set.
xThe real coordinate of the reference.
yThe imaginary coordinate of the reference.

Definition at line 53 of file ref_set.c.

References debug_message, ref_set_node::next, ref_set::set, ref_set_node::x, and ref_set_node::y.

Referenced by find_ref(), and fpxx_start().

+ Here is the caller graph for this function:

struct ref_set* ref_set_new ( )
read

Create a new reference set.

Returns
A new reference set.

Definition at line 20 of file ref_set.c.

References debug_message.

Referenced by fpxx_start().

+ Here is the caller graph for this function: