home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.4eee3cf66f,2026/08/01
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
version 20260801.develop.4eee3cf66f
FloatIndex.h
Go to the documentation of this file.
1
/**
2
* \file IMP/FloatIndex.h
3
* \brief A FloatIndex identifies an optimized attribute in a model.
4
*
5
* Copyright 2007-2026 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPKERNEL_FLOAT_INDEX_H
10
#define IMPKERNEL_FLOAT_INDEX_H
11
12
#include <IMP/kernel_config.h>
13
#include "
base_types.h
"
14
#include "
particle_index.h
"
15
#include <
IMP/tuple_macros.h
>
16
17
IMPKERNEL_BEGIN_NAMESPACE
18
19
class
Model;
20
21
//! A FloatIndex identifies an optimized attribute in a model.
22
/** This can be a single Float attribute, or a single element in an
23
optimized Vector3D or Vector4D, depending on the constructor used.
24
*/
25
class
IMPKERNELEXPORT
FloatIndex
:
public
Value
{
26
FloatKey
fk_;
27
Vector3DDerivKey
v3k_;
28
Vector4DDerivKey
v4k_;
29
int
dim_;
30
int
index_;
31
ParticleIndex
pi_;
32
public
:
33
FloatIndex
(
IMP::ParticleIndex
pi,
IMP::FloatKey
k)
34
: fk_(k), dim_(0), pi_(pi) {}
35
36
FloatIndex
(
IMP::ParticleIndex
pi,
IMP::Vector3DDerivKey
k,
int
index)
37
: v3k_(k), dim_(3), index_(index), pi_(pi) {}
38
39
FloatIndex
(
IMP::ParticleIndex
pi,
IMP::Vector4DDerivKey
k,
int
index)
40
: v4k_(k), dim_(4), index_(index), pi_(pi) {}
41
42
FloatKey
get_float_key()
const
{
return
fk_; }
43
44
void
set_value(
Model
*m,
Float
v)
const
;
45
46
Float
get_value(
Model
*m)
const
;
47
48
Float
get_derivative(
Model
*m)
const
;
49
50
IMP_SHOWABLE_INLINE
(
FloatIndex
, out <<
"("
<< pi_ <<
")"
);
51
};
52
53
IMP_VALUES
(
FloatIndex
,
FloatIndexes
);
54
55
IMPKERNEL_END_NAMESPACE
56
57
#endif
/* IMPKERNEL_FLOAT_INDEX_H */
base_types.h
Basic types used by IMP.
IMP_SHOWABLE_INLINE
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Definition:
showable_macros.h:51
particle_index.h
Functions and adaptors for dealing with particle indexes.
IMP::Index< ParticleIndexTag >
tuple_macros.h
Macros to help in defining tuple classes.
IMP::Vector< FloatIndex >
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:86
IMP::Value
Base class for a simple primitive-like type.
Definition:
Value.h:23
IMP_VALUES
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition:
value_macros.h:23
IMP::Key< 0 >
IMP::FloatIndex
A FloatIndex identifies an optimized attribute in a model.
Definition:
FloatIndex.h:25
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:19