Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam
3rdparty
Eigen
demos
mandelbrot
mandelbrot.h
Go to the documentation of this file.
1
// This file is part of Eigen, a lightweight C++ template library
2
// for linear algebra.
3
//
4
// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>
5
//
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10
#ifndef MANDELBROT_H
11
#define MANDELBROT_H
12
13
#include <Eigen/Core>
14
#include <QtGui/QApplication>
15
#include <QtGui/QWidget>
16
#include <QtCore/QThread>
17
18
class
MandelbrotWidget
;
19
20
class
MandelbrotThread
:
public
QThread
21
{
22
friend
class
MandelbrotWidget
;
23
MandelbrotWidget
*
widget
;
24
long
long
total_iter
;
25
int
id
,
max_iter
;
26
bool
single_precision
;
27
28
public
:
29
MandelbrotThread
(
MandelbrotWidget
*
w
,
int
i
) :
widget
(
w
),
id
(
i
) {}
30
void
run
();
31
template
<
typename
Real>
void
render
(
int
img_width,
int
img_height);
32
};
33
34
class
MandelbrotWidget
:
public
QWidget
35
{
36
Q_OBJECT
37
38
friend
class
MandelbrotThread
;
39
Eigen::Vector2d
center
;
40
double
xradius
;
41
int
size
;
42
unsigned
char
*
buffer
;
43
QPoint
lastpos
;
44
int
draft
;
45
MandelbrotThread
**
threads
;
46
int
threadcount
;
47
48
protected
:
49
void
resizeEvent
(QResizeEvent *);
50
void
paintEvent
(QPaintEvent *);
51
void
mousePressEvent
(QMouseEvent *event);
52
void
mouseMoveEvent
(QMouseEvent *event);
53
54
public
:
55
MandelbrotWidget
() : QWidget(),
center
(0,0),
xradius
(2),
56
size
(0),
buffer
(0),
draft
(16)
57
{
58
setAutoFillBackground(
false
);
59
threadcount
= QThread::idealThreadCount();
60
threads
=
new
MandelbrotThread
*[
threadcount
];
61
for
(
int
th = 0; th <
threadcount
; th++)
threads
[th] =
new
MandelbrotThread
(
this
, th);
62
}
63
~MandelbrotWidget
()
64
{
65
if
(
buffer
)
delete
[]
buffer
;
66
for
(
int
th = 0; th <
threadcount
; th++)
delete
threads
[th];
67
delete
[]
threads
;
68
}
69
};
70
71
#endif // MANDELBROT_H
w
RowVector3d w
Definition:
Matrix_resize_int.cpp:3
MandelbrotThread::max_iter
int max_iter
Definition:
mandelbrot.h:25
MandelbrotWidget::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition:
mandelbrot.cpp:173
MandelbrotThread::total_iter
long long total_iter
Definition:
mandelbrot.h:24
MandelbrotWidget::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
Definition:
mandelbrot.cpp:188
MandelbrotWidget::buffer
unsigned char * buffer
Definition:
mandelbrot.h:42
MandelbrotWidget::paintEvent
void paintEvent(QPaintEvent *)
Definition:
mandelbrot.cpp:127
buffer
Definition:
pytypes.h:2272
MandelbrotWidget::~MandelbrotWidget
~MandelbrotWidget()
Definition:
mandelbrot.h:63
MandelbrotWidget::resizeEvent
void resizeEvent(QResizeEvent *)
Definition:
mandelbrot.cpp:17
MandelbrotThread::id
int id
Definition:
mandelbrot.h:25
MandelbrotThread::render
void render(int img_width, int img_height)
Definition:
mandelbrot.cpp:31
MandelbrotWidget::MandelbrotThread
friend class MandelbrotThread
Definition:
mandelbrot.h:38
MandelbrotWidget::draft
int draft
Definition:
mandelbrot.h:44
MandelbrotWidget::threads
MandelbrotThread ** threads
Definition:
mandelbrot.h:45
MandelbrotThread::widget
MandelbrotWidget * widget
Definition:
mandelbrot.h:23
MandelbrotWidget::size
int size
Definition:
mandelbrot.h:41
MandelbrotWidget::threadcount
int threadcount
Definition:
mandelbrot.h:46
MandelbrotThread::single_precision
bool single_precision
Definition:
mandelbrot.h:26
MandelbrotWidget::center
Eigen::Vector2d center
Definition:
mandelbrot.h:39
MandelbrotThread
Definition:
mandelbrot.h:20
MandelbrotThread::run
void run()
Definition:
mandelbrot.cpp:111
MandelbrotWidget
Definition:
mandelbrot.h:34
MandelbrotWidget::MandelbrotWidget
MandelbrotWidget()
Definition:
mandelbrot.h:55
MandelbrotThread::MandelbrotThread
MandelbrotThread(MandelbrotWidget *w, int i)
Definition:
mandelbrot.h:29
MandelbrotWidget::xradius
double xradius
Definition:
mandelbrot.h:40
MandelbrotWidget::lastpos
QPoint lastpos
Definition:
mandelbrot.h:43
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:02:00