SWoTTeD 1.0.2a4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swotted/__init__.py +17 -0
- swotted/decomposition_contraints.py +87 -0
- swotted/fastswotted.py +604 -0
- swotted/loss_metrics.py +39 -0
- swotted/slidingWindow_model.py +161 -0
- swotted/swotted.py +417 -0
- swotted/temporal_regularization.py +56 -0
- swotted/utils.py +52 -0
- swotted/version.py +9 -0
- swotted-1.0.2a4.dist-info/METADATA +249 -0
- swotted-1.0.2a4.dist-info/RECORD +13 -0
- swotted-1.0.2a4.dist-info/WHEEL +4 -0
- swotted-1.0.2a4.dist-info/licenses/LICENSE.txt +165 -0
swotted/utils.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""SWoTTeD utiles (datasets)
|
|
3
|
+
"""
|
|
4
|
+
import torch
|
|
5
|
+
from torch.utils.data import Dataset
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Subset(Dataset):
|
|
9
|
+
def __init__(self, dataset, indices):
|
|
10
|
+
self.dataset = dataset
|
|
11
|
+
self.indices = indices
|
|
12
|
+
|
|
13
|
+
def __getitem__(self, idx):
|
|
14
|
+
return self.dataset[self.indices[idx]], idx
|
|
15
|
+
|
|
16
|
+
def __len__(self):
|
|
17
|
+
return len(self.indices)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def transform3DTensorTo4D(dataset, twl):
|
|
21
|
+
dataset = [torch.t(dataset[i]) for i in range(len(dataset))]
|
|
22
|
+
tensor4D = torch.stack(
|
|
23
|
+
[
|
|
24
|
+
torch.zeros((int(dataset[Tp].shape[0] / twl), twl, dataset[Tp].shape[1]))
|
|
25
|
+
for Tp in range(len(dataset))
|
|
26
|
+
]
|
|
27
|
+
)
|
|
28
|
+
for i in range(len(dataset)):
|
|
29
|
+
for j in range(int(dataset[i].shape[0] / twl)):
|
|
30
|
+
tensor4D[i][j] = dataset[i][(j * twl) : (j + 1) * twl]
|
|
31
|
+
return torch.transpose(tensor4D, 2, 3)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def success_rate(base, result):
|
|
35
|
+
"""
|
|
36
|
+
Parameters
|
|
37
|
+
-----------
|
|
38
|
+
base: torch.Tensor
|
|
39
|
+
phenotypes, pathways or patients matrices
|
|
40
|
+
result: torch.Tensor
|
|
41
|
+
tensor with the same shape as base
|
|
42
|
+
"""
|
|
43
|
+
dis = 0
|
|
44
|
+
max = 0
|
|
45
|
+
for i in range(len(base)):
|
|
46
|
+
dis += torch.norm((base[i] - result[i]), p="fro").item()
|
|
47
|
+
max += torch.norm(base[i], p="fro").item()
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
return 1 - dis / max
|
|
51
|
+
except ZeroDivisionError:
|
|
52
|
+
return 0
|
swotted/version.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
'''
|
|
3
|
+
Version file automatically generated by setuptools-scm via hatch-vcs.
|
|
4
|
+
https://pypi.org/project/setuptools-scm/
|
|
5
|
+
https://github.com/ofek/hatch-vcs
|
|
6
|
+
Do not track this file and do not edit it manually.
|
|
7
|
+
'''
|
|
8
|
+
VERSION = '1.0.2a4'
|
|
9
|
+
VERSION_TUPLE = (1, 0, 2)
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: SWoTTeD
|
|
3
|
+
Version: 1.0.2a4
|
|
4
|
+
Summary: A tensor decomposition model extracting temporal phenotypes
|
|
5
|
+
Project-URL: homepage, https://gitlab.inria.fr/hsebia/swotted
|
|
6
|
+
Project-URL: repository, https://gitlab.inria.fr/hsebia/swotted
|
|
7
|
+
Project-URL: documentation, https://hsebia.gitlabpages.inria.fr/swotted/
|
|
8
|
+
Author-email: Hana Sebia <hana.sebia@inria.fr>, Thomas Guyet <thomas.guyet@inria.fr>, Mike Rye <jan-michael.rye@inria.fr>
|
|
9
|
+
License: GNU LESSER GENERAL PUBLIC LICENSE
|
|
10
|
+
Version 3, 29 June 2007
|
|
11
|
+
|
|
12
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
13
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
14
|
+
of this license document, but changing it is not allowed.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
This version of the GNU Lesser General Public License incorporates
|
|
18
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
19
|
+
License, supplemented by the additional permissions listed below.
|
|
20
|
+
|
|
21
|
+
0. Additional Definitions.
|
|
22
|
+
|
|
23
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
24
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
25
|
+
General Public License.
|
|
26
|
+
|
|
27
|
+
"The Library" refers to a covered work governed by this License,
|
|
28
|
+
other than an Application or a Combined Work as defined below.
|
|
29
|
+
|
|
30
|
+
An "Application" is any work that makes use of an interface provided
|
|
31
|
+
by the Library, but which is not otherwise based on the Library.
|
|
32
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
33
|
+
of using an interface provided by the Library.
|
|
34
|
+
|
|
35
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
36
|
+
Application with the Library. The particular version of the Library
|
|
37
|
+
with which the Combined Work was made is also called the "Linked
|
|
38
|
+
Version".
|
|
39
|
+
|
|
40
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
41
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
42
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
43
|
+
based on the Application, and not on the Linked Version.
|
|
44
|
+
|
|
45
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
46
|
+
object code and/or source code for the Application, including any data
|
|
47
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
48
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
49
|
+
|
|
50
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
51
|
+
|
|
52
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
53
|
+
without being bound by section 3 of the GNU GPL.
|
|
54
|
+
|
|
55
|
+
2. Conveying Modified Versions.
|
|
56
|
+
|
|
57
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
58
|
+
facility refers to a function or data to be supplied by an Application
|
|
59
|
+
that uses the facility (other than as an argument passed when the
|
|
60
|
+
facility is invoked), then you may convey a copy of the modified
|
|
61
|
+
version:
|
|
62
|
+
|
|
63
|
+
a) under this License, provided that you make a good faith effort to
|
|
64
|
+
ensure that, in the event an Application does not supply the
|
|
65
|
+
function or data, the facility still operates, and performs
|
|
66
|
+
whatever part of its purpose remains meaningful, or
|
|
67
|
+
|
|
68
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
69
|
+
this License applicable to that copy.
|
|
70
|
+
|
|
71
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
72
|
+
|
|
73
|
+
The object code form of an Application may incorporate material from
|
|
74
|
+
a header file that is part of the Library. You may convey such object
|
|
75
|
+
code under terms of your choice, provided that, if the incorporated
|
|
76
|
+
material is not limited to numerical parameters, data structure
|
|
77
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
78
|
+
(ten or fewer lines in length), you do both of the following:
|
|
79
|
+
|
|
80
|
+
a) Give prominent notice with each copy of the object code that the
|
|
81
|
+
Library is used in it and that the Library and its use are
|
|
82
|
+
covered by this License.
|
|
83
|
+
|
|
84
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
85
|
+
document.
|
|
86
|
+
|
|
87
|
+
4. Combined Works.
|
|
88
|
+
|
|
89
|
+
You may convey a Combined Work under terms of your choice that,
|
|
90
|
+
taken together, effectively do not restrict modification of the
|
|
91
|
+
portions of the Library contained in the Combined Work and reverse
|
|
92
|
+
engineering for debugging such modifications, if you also do each of
|
|
93
|
+
the following:
|
|
94
|
+
|
|
95
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
96
|
+
the Library is used in it and that the Library and its use are
|
|
97
|
+
covered by this License.
|
|
98
|
+
|
|
99
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
100
|
+
document.
|
|
101
|
+
|
|
102
|
+
c) For a Combined Work that displays copyright notices during
|
|
103
|
+
execution, include the copyright notice for the Library among
|
|
104
|
+
these notices, as well as a reference directing the user to the
|
|
105
|
+
copies of the GNU GPL and this license document.
|
|
106
|
+
|
|
107
|
+
d) Do one of the following:
|
|
108
|
+
|
|
109
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
110
|
+
License, and the Corresponding Application Code in a form
|
|
111
|
+
suitable for, and under terms that permit, the user to
|
|
112
|
+
recombine or relink the Application with a modified version of
|
|
113
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
114
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
115
|
+
Corresponding Source.
|
|
116
|
+
|
|
117
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
118
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
119
|
+
a copy of the Library already present on the user's computer
|
|
120
|
+
system, and (b) will operate properly with a modified version
|
|
121
|
+
of the Library that is interface-compatible with the Linked
|
|
122
|
+
Version.
|
|
123
|
+
|
|
124
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
125
|
+
be required to provide such information under section 6 of the
|
|
126
|
+
GNU GPL, and only to the extent that such information is
|
|
127
|
+
necessary to install and execute a modified version of the
|
|
128
|
+
Combined Work produced by recombining or relinking the
|
|
129
|
+
Application with a modified version of the Linked Version. (If
|
|
130
|
+
you use option 4d0, the Installation Information must accompany
|
|
131
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
132
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
133
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
134
|
+
for conveying Corresponding Source.)
|
|
135
|
+
|
|
136
|
+
5. Combined Libraries.
|
|
137
|
+
|
|
138
|
+
You may place library facilities that are a work based on the
|
|
139
|
+
Library side by side in a single library together with other library
|
|
140
|
+
facilities that are not Applications and are not covered by this
|
|
141
|
+
License, and convey such a combined library under terms of your
|
|
142
|
+
choice, if you do both of the following:
|
|
143
|
+
|
|
144
|
+
a) Accompany the combined library with a copy of the same work based
|
|
145
|
+
on the Library, uncombined with any other library facilities,
|
|
146
|
+
conveyed under the terms of this License.
|
|
147
|
+
|
|
148
|
+
b) Give prominent notice with the combined library that part of it
|
|
149
|
+
is a work based on the Library, and explaining where to find the
|
|
150
|
+
accompanying uncombined form of the same work.
|
|
151
|
+
|
|
152
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
153
|
+
|
|
154
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
155
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
156
|
+
versions will be similar in spirit to the present version, but may
|
|
157
|
+
differ in detail to address new problems or concerns.
|
|
158
|
+
|
|
159
|
+
Each version is given a distinguishing version number. If the
|
|
160
|
+
Library as you received it specifies that a certain numbered version
|
|
161
|
+
of the GNU Lesser General Public License "or any later version"
|
|
162
|
+
applies to it, you have the option of following the terms and
|
|
163
|
+
conditions either of that published version or of any later version
|
|
164
|
+
published by the Free Software Foundation. If the Library as you
|
|
165
|
+
received it does not specify a version number of the GNU Lesser
|
|
166
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
167
|
+
General Public License ever published by the Free Software Foundation.
|
|
168
|
+
|
|
169
|
+
If the Library as you received it specifies that a proxy can decide
|
|
170
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
171
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
172
|
+
permanent authorization for you to choose that version for the
|
|
173
|
+
Library.
|
|
174
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
175
|
+
Classifier: Operating System :: OS Independent
|
|
176
|
+
Classifier: Programming Language :: Python :: 3
|
|
177
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
178
|
+
Requires-Python: >=3.7
|
|
179
|
+
Requires-Dist: datetime
|
|
180
|
+
Requires-Dist: fastapi
|
|
181
|
+
Requires-Dist: ipykernel
|
|
182
|
+
Requires-Dist: jupyter
|
|
183
|
+
Requires-Dist: lightning
|
|
184
|
+
Requires-Dist: matplotlib
|
|
185
|
+
Requires-Dist: munkres
|
|
186
|
+
Requires-Dist: numpy
|
|
187
|
+
Requires-Dist: omegaconf
|
|
188
|
+
Requires-Dist: pandas
|
|
189
|
+
Requires-Dist: psycopg
|
|
190
|
+
Requires-Dist: pytorch-lightning
|
|
191
|
+
Requires-Dist: seaborn
|
|
192
|
+
Description-Content-Type: text/markdown
|
|
193
|
+
|
|
194
|
+
# SWoTTeD : An Extension of Tensor Decomposition to Temporal Phenotyping
|
|
195
|
+
|
|
196
|
+
This repository contains the implementation of **SWoTTeD** (**S**liding **W**ind**o**w for **T**emporal **Te**nsor **D**ecomposition)
|
|
197
|
+
|
|
198
|
+

|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Authors
|
|
202
|
+
|
|
203
|
+
* Hana Sebia, Inria, [AIstroSight](https://team.inria.fr/aistrosight/)
|
|
204
|
+
* Thomas Guyet, Inria, [AIstroSight](https://team.inria.fr/aistrosight/)
|
|
205
|
+
* Mike Rye, Inria, [AIstroSight](https://team.inria.fr/aistrosight/)
|
|
206
|
+
|
|
207
|
+
### Overview
|
|
208
|
+
|
|
209
|
+
***SWoTTeD*** is a tensor decomposition framework to extract temporal phenotypes from structured data. Most recent decomposition models allow extracting phenotypes that only describe snapshots of typical profiles, also called daily phenotypes. However, ***SWoTTeD*** extends the notion of daily phenotype into temporal phenotype describing an arrangement of features over a time window.
|
|
210
|
+
|
|
211
|
+
The capabilities of the SWoTTeD model are illustrated in the [example notebook](./notebooks/SWoTTeD_module_example.ipynb).
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
This code implements the SWoTTeD as a [PyTorch Lightning](http://lightning.ai) module that you can embed in you own architecture. The `SWoTTeD` module enables:
|
|
215
|
+
* to discover phenotypes through the decomposition of a *3D tensor* (with dimensions: patients, features and time). To deal with patient' data having different duration, the dataset is a collection of pathways (2D matrices);
|
|
216
|
+
* to project new patient pathways on discovered phenotypes;
|
|
217
|
+
* to predict next events in a pathways.
|
|
218
|
+
|
|
219
|
+
More documentation about this project and how to use the model is available here: [https://hsebia.gitlabpages.inria.fr/swotted/](https://hsebia.gitlabpages.inria.fr/swotted/).
|
|
220
|
+
|
|
221
|
+
### How to install
|
|
222
|
+
|
|
223
|
+
The `pyproject.toml` is the project configuration file for *hatchling* which enables to create and set up a virtual environment suitable to run `SWoTTeD`.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
git clone https://gitlab.inria.fr/hsebia/swotted
|
|
227
|
+
|
|
228
|
+
cd swotted
|
|
229
|
+
pip install -e .
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`SWoTTeD` is also available on the Python Package Index (PyPI). In this case, you will only have the model (but not the tests, including the random generator of random tensors with hidden patterns). See the First run example in the documentation in this case.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
pip install swotted
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### How to cite
|
|
239
|
+
|
|
240
|
+
```bibtex
|
|
241
|
+
@article{sebia2024swotted,
|
|
242
|
+
title={SWoTTeD: an extension of tensor decomposition to temporal phenotyping},
|
|
243
|
+
author={Sebia, Hana and Guyet, Thomas and Audureau, Etienne},
|
|
244
|
+
journal={Machine Learning},
|
|
245
|
+
pages={1--42},
|
|
246
|
+
year={2024},
|
|
247
|
+
publisher={Springer}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
swotted/__init__.py,sha256=i1F5MNFV_Is-RoBdc9SJCFMaKb8SCfAB6NgkeePzwkI,278
|
|
2
|
+
swotted/decomposition_contraints.py,sha256=KmetBZOmk-mzmZMTucaTh6CbAewUvDPtRzHVRVolk4Y,2115
|
|
3
|
+
swotted/fastswotted.py,sha256=1j6Kv2ye7faqHU817N6UdRDX9VVGqqOkBELnEeBJc94,20529
|
|
4
|
+
swotted/loss_metrics.py,sha256=NJzBumyL_gkZa9nJtD8sZ8dtlEwxRYwgni5V38nDuQQ,978
|
|
5
|
+
swotted/slidingWindow_model.py,sha256=Q2CSfH1VvsOmLsEXBHopAhYvIkFUpZBe-rrRWB-BETk,5635
|
|
6
|
+
swotted/swotted.py,sha256=50LDL2K7HfxvyLuHKblbJWT63piyTeV-hi59v2-Vcb0,13788
|
|
7
|
+
swotted/temporal_regularization.py,sha256=dphhaXaFvrQyLDQYGM_tEoU6JNkcjlUGfqrJUcGCLPM,1757
|
|
8
|
+
swotted/utils.py,sha256=eCuZJwUqLLqzBx7LTEC_nVlaIg8PcmIkReF8WQPnNsQ,1347
|
|
9
|
+
swotted/version.py,sha256=pP_wrs3_fOCaMHZTdUp8mV5QjvpKfeGkm6j5jQsGido,274
|
|
10
|
+
swotted-1.0.2a4.dist-info/METADATA,sha256=z-Xv1balqLjcr49TbiO_K4uxYiPk5hSpMp4A27yxm3k,12611
|
|
11
|
+
swotted-1.0.2a4.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
12
|
+
swotted-1.0.2a4.dist-info/licenses/LICENSE.txt,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
+
swotted-1.0.2a4.dist-info/RECORD,,
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|